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
How do I insert the date into my table?My website www.quicheandpie.com has navigation buttons which were added by going to admin/categorylist and adding a category. I can add category = navigation buttons and update them, but I can not delete them. Any ideas how I can find where the info
How do I include a conditional in my mysql query?
I am extracting data from a MySQL Database of which one of the data stored is seperated by a comma. For example, step1,go here,step 2,go there,step 3,go back etc etc. I want to know how to split the data at the comma and format it in html. Using the split
What is difference between mysql_fetch_array and mysql_fetch_object?
