Jump to content

PrestashopDatabaseException on any action performed on the shop


Recommended Posts

I get this error and similar ones if i try to add a product to cart, create a new product, update anything from the back office. Debug mode is set to true.

 

[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 'id #90)) GROUP BY c.`id_condition`' at line 4
 

SELECT c.`id_condition`
FROM `ps_condition` c
LEFT JOIN `ps_condition_badge` cb ON cb.`id_condition` = c.`id_condition`
WHERE (c.`calculation_type` = 'hook') AND (c.`calculation_detail` = 'actionObjectCartAddAfter') AND (c.`validated` = 0) AND (cb.`id_badge` IN (Object id #90))
GROUP BY c.`id_condition`


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

 

I have updated my mysql from 5.0.77 to 5.0.95. php5.1.6

The annoying thing is this same code works on my test server with same specs but on moving to production i get these errors. Please i need help urgently. The site is live already

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...