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

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



ASK A QUESTION

More mysql PHP Questions

How do I find the ID of a new row added to a table?

How do I return the date with mySQL?

how to write sessions in php code?

How do I find the number of rows in a result set?

How do I update the contents of a table row?



Custom Search