How do I return the date with mySQL?
For instance when a user registers for the site, you might want to record the date they registered on, and so forth.
To do so, use the CURDATE() function within mysql, like this:
<?php
$todayis = mysql_query("SELECT CURDATE() FROM table");
$itis = mysql_result($todayis,0,0);
echo "Today is: $itis";
?>
Comment on this Question and Answer >>>
ASK A QUESTION
More mysql PHP Questions
How do I limit the number of rows returned?How do I include a conditional in my mysql query?
Equip table and Vendor table. Each piece of equipment has a matching vendor ID. How to display vendor name instead of ID in PHP output?
the code is running well without errors but y is it that three of the columns in the table do not insert data?
What is difference between mysql_fetch_array and mysql_fetch_object?
