[Solved] How can I set the MySQL date with string like 2015-07-30 18:32:18 [duplicate]

[ad_1]

You need to place quotes around your date i.e. $timestring as

"UPDATE posts SET creatdate="$timestring" WHERE postid = 1 "

[ad_2]

solved How can I set the MySQL date with string like 2015-07-30 18:32:18 [duplicate]