[PHP-DB] Inserting date into a table
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 -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Inserting a date in to DATE field
Hi everyone, Is there any MySQL command which inserts the date into a DATE field of a table automatically. For example the user inserts into the table several values (name, age, etc) and the date is inserted automatically. Thanks in advance Pambos. _ The new MSN 8: smart spam protection and 2 months FREE* http://join.msn.com/?page=features/junkmail -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Selecting Null columns
Hi everyone I am a new user of this mail list and I hope that it will be helpful. I am trying to show the content of a MySQL table(raw) where the content of a column is NOT NULL. I used the commands below but the result shows the content of the whole table for the first case and nothing in the second case. SELECT * FROM questions WHERE answer IS NOT NULL ; SELECT * FROM questions WHERE answer NULL ; Thanks in advance Nicolaou Pambos _ Help STOP SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php