php - PDO - 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 -
i error when trying update table in database.
code:
$stmt = $db->query("update pages set title, desc values :title, :newdesc id = '1'"); $stmt = $db->execute(array(":title" => "awesome", ":newdesc" => "test"));
the error this, found it's nothing other parts of code put empty file , same thing happened:
error:
[23-aug-2016 15:24:02 america/chicago] php fatal error: uncaught exception 'pdoexception' message 'sqlstate[42000]: syntax error or access violation: 1064 have error in sql syntax; check manual corresponds mariadb server version right syntax use near ' desc values :title, :newdesc id = '1'' @ line 1' in /home/officia4/gptscript/mitch.php:25 stack trace: #0 /home/officia4/gptscript/mitch.php(25): pdo->query('update pages se...') #1 {main} thrown in /home/officia4/gptscript/mitch.php on line 25
Comments
Post a Comment