Answer the question
In order to leave comments, you need to log in
How to find sql error from MODX log?
Constantly there is an error about SQL syntax. I can't figure out where to look for it. Can you tell me how to catch her?
I tried to search by clicking on the links on the site and doing actions in the admin panel. So I didn't find it. The error appears on the production, but on the copy it is impossible to repeat.
[2019-12-19 18:22:06] (ERROR @ /home/site.ru/core/xpdo/om/xpdoobject.class.php : 240) Error 42000 executing statement:
Array
(
[0] => 42000
[ 1] => 1064
[2] => 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 ') DESC' at line 1
)
$xpdo->log(xPDO::LOG_LEVEL_ERROR, 'Error ' . $criteria->stmt->errorCode() . " executing statement: \n" . print_r($errorInfo, true) . 'SQL' . $criteria-> toSQL());
Answer the question
In order to leave comments, you need to log in
Open the file /home/site.ru/core/xpdo/om/xpdoobject.class.php line 240
and see what kind of request is there that gives an error.
although this is a fake PDO class? hmm ... well, at least look at what object / method is called there
and look for a call to this place in the code.
PS: copy the base from the production! then it might be possible to do it again.
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 ') DESC' at line 1
it is.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question