0

Есть запрос

UPDATE files SET load = :load, count = :count WHERE id = :id

При выполнении которого, всплывают ошибки

( ! ) 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 'load = '1404402799', count = '1' where id = '13'' at line 1' in C:\OpenServer\domains\img.com\engine\db.php on line 37

( ! ) PDOException: 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 'load = '1404402799', count = '1' where id = '13'' at line 1 in C:\OpenServer\domains\img.com\engine\db.php on line 37

1 ответ 1

2

Неверный (вообще-то об этом говорится английским по-белому). Или не используйте для своих целей зарезервированные слова, или заворачивайте их в обратные кавычки:

Первый вариант (не использовать) правильней.

Ваш ответ

By clicking “Отправить ответ”, you agree to our terms of service and acknowledge you have read our privacy policy.

Всё ещё ищете ответ? Посмотрите другие вопросы с метками или задайте свой вопрос.