Page 1 of 1

Updating/Adding A Date

Posted: Sat Mar 11, 2006 12:15 pm
by icesolid
Updating or Adding dates to my database is not working.

Fields:

id INT(11)
date_ordered DATE (default 0000-00-00)

Code: Select all

mysql_query("UPDATE cases SET date_ordered='2006-03-11' WHERE id='1'");
Same with my insert query:

Code: Select all

mysql_query("INSERT INTO cases SET date_ordered='2006-03-11'");

Posted: Sat Mar 11, 2006 12:32 pm
by R4000

Code: Select all

mysql_query("INSERT INTO cases (date_ordered) VALUES ('2006-03-11');");

Posted: Sat Mar 11, 2006 1:06 pm
by icesolid
What about the update query?

Posted: Sat Mar 11, 2006 1:08 pm
by feyd
what does MySQL say about your update? mysql_error(), mysql_affected_rows()