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 delete a row from a table?Why does this code not work? Returns this error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND ClaimNo = AND UserName = john' at line 2
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
How do I find the longest value in my mysql table?
how can I show an image from mysql?
