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'");
?>
More mysql PHP Questions
How do I order the results of my query?How do I group the results of a mysql query?
How do I set a default value for ENUM fields in PHP?
How do I return a random row from the database?
How do I include a conditional in my mysql query?