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


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

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

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