PHP Questions Home

Categories

Arrays
Files
Forms
Functions
Images
MySQL
Numbers
Others
Strings
Website


PHP Functions

PHP Functions


More PHP

Top Questions
Ask a Question

How do I insert the date into my table?


With your mysql table inserting todays date is a doddle.

All you need to do is use the built-in CURDATE function, and it works a little like this:

<?php

$q 
mysql_query("UPDATE todaysdate SET todayis = CURDATE()");
//sets the field todayis in table todaysdate to 2007-09-18 or whatever the current date is
?>



More mysql PHP Questions

How do I find the longest value in my mysql table?
How do I limit the number of rows returned?
How do I access the current time with mysql?
How do I find the ID of a new row added to a table?
How do I find second highest value from a table?