For Programmers: Free Programming Magazines  


Home > Archive > PHP DB > April 2004 > Inserting date into a table









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Inserting date into a table
Pambos Nicolaou

2004-04-24, 1:31 am

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/ibu...gn.asp?cid=3963
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com