ALMAJ Posted January 10, 2015 Share Posted January 10, 2015 (edited) Hi, I'm getting an error when I try to compare products on my prestashop 1.5.6.x store Error: [PrestaShopDatabaseException] 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 '(12.95cm) (/) na diagonal' AND id_lang='2' LIMIT 1' at line 1 SELECT * FROM ps_feature_value_lang WHERE value='5.1' (12.95cm) (/) na diagonal' AND id_lang='2' LIMIT 1at line 613 in file classes/db/Db.php 607. WebserviceRequest::getInstance()->setError(500, ' '.$this->getMsgError().'. From '.(isset($dbg[3]['class']) ? $dbg[3]['class'] : '').'->'.$dbg[3]['function'].'() Query was : '.$sql, 97);608. }609. else if (_PS_DEBUG_SQL_ && $errno && !defined('PS_INSTALLATION_IN_PROGRESS'))610. {611. if ($sql)612. throw new PrestaShopDatabaseException($this->getMsgError().'<br /><br /><pre>'.$sql.'</pre>');613. throw new PrestaShopDatabaseException($this->getMsgError());614. }615. }616.617. /** DbCore->displayError - [line 313 - classes/db/Db.php] - [1 Arguments] DbCore->query - [line 526 - classes/db/Db.php] - [1 Arguments] DbCore->getRow - [line 103 - override/controllers/front/CompareController.php] - [1 Arguments] CompareController->initContent - [line 167 - classes/controller/Controller.php] - [0 Argument] ControllerCore->run - [line 348 - classes/Dispatcher.php] - [0 Argument] DispatcherCore->dispatch - [line 28 - index.php] - [0 Argument] --------------------------------------------------------------------------------------------------------------------------------URL: www.tekcenter.pt/storePrestashop version: 1.5.6.2 (with custom theme: REVIVER) can someone please help me out?thanks in advance Edited January 10, 2015 by ALMAJ (see edit history) Link to comment Share on other sites More sharing options...
ALMAJ Posted January 10, 2015 Author Share Posted January 10, 2015 (edited) Ok, so i have discovered the source of the problem...it turns out that the problem was some special characters (/) and (') in the product features, that is not acceptable by default in the SQL database syntax now the question is: how to have special characters in the product features and to be acceptable in the SQL database syntax? if anyone knows a solution please let me know Best regards - Alcino Major Edited January 11, 2015 by ALMAJ (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts