How do I access the current time with mysql?
When you want to log when something happens - for instance a post to your message board, this will be a particularly useful thing to know.
With the current time and date you will need to use NOW() like so:
<?php
$update = mysql_query("UPDATE my_users SET lastlogin = NOW() WHERE username = 'elvis'");
?>
Comment on this Question and Answer >>>
ASK A QUESTION
More mysql PHP Questions
the code is running well without errors but y is it that three of the columns in the table do not insert data?How do I find the longest value in my mysql table?
How do I include a conditional in my mysql query?
How do I find second highest value from a table?
the uploading status shows success but not showing in the server is empty the written php file is first gave warning cannot uploaded warning in foreach loop but i corrected mistake by keeping above if condition and no error status shows success upload b
