Kiran Tej
Kiran Tej

Reputation: 143

Insert 0000-00-00 00:00:00 to DateTime in Mysql Database

Is there a way to insert "0000-00-00 00:00:00" to send from PHP to store it in MySql database ?

Should I change the database field's default value as "0000-00-00 00:00:00" ?

Upvotes: 1

Views: 2201

Answers (1)

Veer Shrivastav
Veer Shrivastav

Reputation: 5496

Dont pass any argument to your DateTime column.

 insert into table_name (column_name) values('');

For update

 update table_name set column_name='' where other_column_name=value

Upvotes: 2

Related Questions