Answer the question
In order to leave comments, you need to log in
How to solve PDO MySQL problem?
Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '`user`='78.25.148.182'' at line 1' in C:\xampp\htdocs\lib\functions.php:234 Stack trace: #0 C:\xampp\htdocs\lib\functions.php(234): PDOStatement->execute(Array) #1 C:\xampp\htdocs\access.php(14): antibot(Object(PDO), 2) #2 {main} thrown in C:\xampp\htdocs\lib\functions.php on line 234
$mysqlx = $pdo->prepare("UPDATE `journal` SET `data` = ? WHERE `number` = 1 `user` = ?;");
$mysqlx->execute(array($j,$ip));
Answer the question
In order to leave comments, you need to log in
Missed AND:
UPDATE `journal` SET `data` = ? WHERE `number` = 1 AND `user` = ?;
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question