Re: Inserting date into a table

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



 
> 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')";
> 

Use the word null (no quotes) in place of 'TIMESTAMP':

INSERT INTO $table
VALUES('', '$name', null, '$question', '$email',
null)";

The above will work in MySQL.  I haven't tried it in
other databases.

~R


	
		
__________________________________
Do you Yahoo!?
Yahoo! Photos: High-quality 4x6 digital prints for 25¢
http://photos.yahoo.com/ph/print_splash

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux