1 Replies - 453 Views - Last Post: 29 April 2017 - 01:43 AM

#1 StealthThrax  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 24
  • Joined: 28-December 16

Need help with query

Posted 29 April 2017 - 12:40 AM

im trying to add a user_date column to my database and i need to make it so that when i accept a user it adds the date to there row when i accept.

need this modified to do so and im lost.

$stmt = $conn->prepare("UPDATE users SET user_role = 'member', user_rank = 'Recruit', user_tag = '[QKxR]', list_order = '27', WHERE user_name =?" );
$stmt->bind_param("s", $gamertag);
if(!$stmt->execute()) {
    echo $stmt->error;
} else {
   echo $gamertag . " " . "has been accepted into the clan as a recruit (To change users rank go to User Rank Change in Admin Panel";
   echo "<br>";
   echo "<a class='btn btn-success btn-lg btn-block' href='user_add.php' role='button'>Refresh Form</a>";
}


Is This A Good Question/Topic? 0
  • +

Replies To: Need help with query

#2 andrewsw  Icon User is online

  • lashings of ginger beer
  • member icon

Reputation: 6340
  • View blog
  • Posts: 25,572
  • Joined: 12-December 12

Re: Need help with query

Posted 29 April 2017 - 01:43 AM

What have you tried?

Have you added user_date to the table? What datatype did you choose?

Investigate a datestamp.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1