Jump to content

You have an error in your SQL syntax..


claudio

Recommended Posts

Hi guys,

 

When visiting the front end (any page), the following error appears;

 

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 ') GROUP BY id_category ORDER BY `level_depth` ASC, c.`position` ASC' at line 7

                SELECT c.id_parent, c.id_category, cl.name, cl.description, cl.link_rewrite
                FROM `ps_category` c
                LEFT JOIN `ps_category_lang` cl ON (c.`id_category` = cl.`id_category` AND `id_lang` = 1)
                LEFT JOIN `ps_category_group` cg ON (cg.`id_category` = c.`id_category`)
                WHERE (c.`active` = 1 OR c.`id_category` = 1)
                 AND `level_depth` <= 3
                AND cg.`id_group` IN ()
                GROUP BY id_category
                ORDER BY `level_depth` ASC, c.`position` ASC

 

 

Any suggestions on how to fix this please?

Thanks!

Link to comment
Share on other sites

The problem is with this part of the SQL statement

AND cg.`id_group` IN ()

It is trying to select based on some group ID's, however the list of group ID's is empty

 

So as Rocky stated, you need to confirm that you have groups defined, or perhaps you have some module installed that is defective.  You may need to search through your modules to find this SQL coding and determine why that group ID list is empty

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