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

Popular posts from this blog

mysql - Dreamhost PyCharm Django Python 3 Launching a Site -

java - Sending SMS with SMSLib and Web Services -

python 3.5 - Pyqtgraph string in x tick -