Jump to content

[PARTIAL SOLVED] - Product comparation - error: [PrestaShopDatabaseException]


Recommended Posts

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 1
at 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.     /**

--------------------------------------------------------------------------------------------------------------------------------

URL: www.tekcenter.pt/store
Prestashop version: 1.5.6.2 (with custom theme: REVIVER)
 

can someone please help me out?

thanks in advance

 

Edited by ALMAJ (see edit history)
Link to comment
Share on other sites

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 by ALMAJ (see edit history)
Link to comment
Share on other sites

×
×
  • Create New...