Ошибка: 1064
Добрый день. Возникает ошибка при обращении к товару следующего содержания:
Ошибка: 1064
Ошибка: 1064 Query Error 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 '-2,5' at line 6 Query: SELECT p.*,p.id FROM shop_product p WHERE p.status = 1 AND 0 ORDER BY p.create_datetime DESC LIMIT -2,5
Причём не на всех товарах, а как то выборочно.
Стало возникать при импорте товаров из 1С. До этого было всё нормально.
Логи db.log:
2019-07-12 05:32:56 212.74.*.* Query Error 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 '-1,5' at line 6 Query: SELECT p.*,p.id FROM shop_product p WHERE p.status = 1 AND 0 ORDER BY p.create_datetime DESC LIMIT -1,5 ## wa-system/database/waModel.class.php(257) #0 wa-system/database/waModel.class.php(357): waModel->run('SELECT p.*,p.id...') #1 wa-apps/shop/lib/classes/shopProductsCollection.class.php(1560): waModel->query('SELECT p.*,p.id...') #2 wa-apps/shop/lib/classes/shopViewHelper.class.php(89): shopProductsCollection->getProducts('*', -1, 5, true) #3 wa-cache/apps/shop/templates/compiled/shop_ru_RU/e1/c3/b9/e1c3b9febc0b1da3e0c9f8294d23a14c4e6ba4a2.file.product.html.php(174): shopViewHelper->products('category/20', -1, 5) #4 wa-system/vendors/smarty3/sysplugins/smarty_internal_templatebase.php(184): content_5d2742cc71ad50_89282533(Object(Smarty_Internal_Template)) #5 wa-system/view/waSmarty3View.class.php(118): Smarty_Internal_TemplateBase->fetch('file:product.ht...', NULL) #6 wa-system/controller/waViewAction.class.php(162): waSmarty3View->fetch('file:product.ht...', NULL) #7 wa-apps/shop/lib/actions/frontend/shopFrontend.action.php(139): waViewAction->display(false) #8 wa-system/controller/waViewController.class.php(86): shopFrontendAction->display() #9 wa-apps/shop/lib/actions/frontend/shopFrontendProduct.controller.php(45): waViewController->executeAction(Object(shopFrontendProductAction)) #10 wa-system/controller/waController.class.php(21): shopFrontendProductController->execute() #11 wa-system/controller/waViewController.class.php(46): waController->run(NULL) #12 wa-system/controller/waFrontController.class.php(254): waViewController->run(NULL) #13 wa-system/controller/waFrontController.class.php(189): waFrontController->runController(Object(shopFrontendProductController), NULL) #14 wa-system/controller/waFrontController.class.php(83): waFrontController->execute(NULL, 'frontend', 'product') #15 wa-system/waSystem.class.php(762): waFrontController->dispatch() #16 wa-system/waSystem.class.php(503): waSystem->dispatchFrontend('bdsm-sado-mazo-...') #17 index.php(7): waSystem->dispatch() #18 {main}
Предположение, что из 1С импортируются какие-то кавычки или спецсимволы...
Подскажите, пожалуйста, в какую сторону смотреть?
1 ответ
Не похоже, что причина в нечитаемых символах. Попробуйте проверить на стандартной теме, сохраняется подобное поведение?