Inserting date into a table
| From: | Pambos Nicolaou | Date: | Sat, 24 Apr 2004 04:35:09 +0000 |
| Subject: | Inserting date into a table | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-34066@lists.php.net to get a copy of this message | ||
I have created the table below:
CREATE TABLE questions (ID INT NOT NULL AUTO_INCREMENT,name VARCHAR(30),day TIMESTAMP, question TEXT, email VARCHAR(30),answer TEXT, PRIMARY KEY(ID));
I want to insert into the TIMESTAMP field the date automatically. How can I do it using the insert command
"INSERT INTO $table VALUES('','$name','TIMESTAMP','$question','$email','NULL')";
Thanks in advance
Pambos Nicolaou
_________________________________________________________________
Protect your PC - get McAfee.com VirusScan Online http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963