PHP Questions Home | Register | Login
Categories
Arrays
Files
Forms
Creating PDFs
PHP Errors
Functions
Images
MySQL
Numbers
Others
Strings
Website
Unanswered

PHP Forums
Forums Index
MySQL Forum
PHP Forum
Flash/Actionscript
Javascript
Web design

More PHP
PHP Functions
Top Questions
Ask a Question
PHP Interview Questions
PHP Jobs
Ecommerce
IT Questions
Business Websites

Sponsors

sponsor ad
My Salary
PHP Developer Salary
Advertise Here

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
?>



Comment on this Question and Answer >>>

ASK A QUESTION

More mysql PHP Questions

How do I group the results of a mysql query?

How do I find the number of rows affected by a query?

How do I return the date with mySQL?

How do I delete a row from a table?

how do i upload an image to database?



Custom Search