SELECT * FROM `rt-groupproducts`,`rt-productgroups` WHERE `product_id`= AND `rt-productgroups`.`group_id`=`rt-groupproducts`.`group_id` ORDER BY `name`,`subtitle`
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 `rt-productgroups`.`group_id`=`rt-groupproducts`.`group_id` ORDER BY `name`,' at line 1