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 'AND item_i1.visible_i1=1 GROUP BY item_view_V1.id_V1, item_i1.id_i1, item_menu_M' at line 1