1064 - 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 'UNION
select c.xsell_groups_id as xsell_group_id, c.xsell_categories_id as' at line 9
select * from
(
select p.xsell_categories_id as xsell_group_id, g.xsell_groups_id as xsell_category_id,
g.xsell_groups_name, g.image, p.adopt_xsell_groups, g.sort_id
from aa_xsell_groups g, aa_xsell_products p
where p.xsell_categories_id=g.xsell_groups_id
and p.adopt_xsell_groups=1
and p.products_id=
UNION
select c.xsell_groups_id as xsell_group_id, c.xsell_categories_id as xsell_category_id,
g.xsell_groups_name, g.image, p.adopt_xsell_groups, g.sort_id
from aa_xsell_categories_to_groups c, aa_xsell_groups g, aa_xsell_products p
where p.xsell_categories_id=c.xsell_categories_id
and c.xsell_groups_id=g.xsell_groups_id
and p.adopt_xsell_groups=0
and p.products_id=
group by c.xsell_groups_id
) RS
order by sort_id asc
TEP_DB_ERRORR
|