title: PHP: Update query not update time in TIMESTAMP() format column?
body: <p>I am working on user online and offline status in php. My problem is that I need to update time in TIMESTAMP() column when user logged in. But here update query doesn't work. Can you please tell me that how to update it</p>
  
  <pre><code>$setLogged = mysqli_query($conn, "UPDATE user SET user_onlineStatus='" . time() . "'WHERE user_id='" . $user_id . "'");
  </code></pre>