Jump to content

You have an error in your SQL syntax


Recommended Posts

Bonjour,

 

Lorsque j'importe des fichiers CSV (à partir d'un module d'import) ,j'ai un message d'erreur qui m'affiche ceci :

 

 

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,2,3,4,5)' at line 1

DELETE FROM `ps_image_lang` WHERE `id_image` IN (,1,2,3,4,5)

 

En local ca fonctionne parfaitement.

 

version MYSQL serveur : 5.1.56-log

version MYSQL local : 5.0.7-dev

 

Le code qui est lié à ce message est celui-ci

 

   $daList = implode(",", array_keys($inactive));
   $query = 'UPDATE `'._DB_PREFIX_.'product`
  SET `active` = 0, `date_upd` = '.$this->quote($time0).'
  WHERE `active` = 1 AND `id_product` IN (
  SELECT `id_product`
  FROM `'. _DB_PREFIX_.'category_product`
  WHERE `id_category` IN ('.$daList.'))';

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