Assign Group Topics

WordPress database error: [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 `group_ext_id` = ""' at line 2]
SELECT `group_name`,`group_int_id`,`parent_group`,`challenge` FROM `wp_9if2ry_groups` WHERE BINARY `comp_int_id`= AND `group_ext_id` = ""

WordPress database error: [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 `group_int_id` =' at line 2]
SELECT `group_name`,`parent_group` FROM `wp_9if2ry_groups` WHERE `comp_int_id` = AND `group_int_id` =

Please Confirm

WordPress database error: [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 '' at line 2]
SELECT `parent_group` FROM `wp_9if2ry_groups` WHERE `group_int_id` =

WordPress database error: [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 BINARY grp.group_int_id=asg.group_int_id AND BINARY asg.`topic_id` = top.`t' at line 2]
SELECT 1 AS isassign, top.`topic_id`,top.`topic_name`,top.`sort_order`FROM `wp_9if2ry_topics` as top, `wp_9if2ry_group_topics` as asg, `wp_9if2ry_groups` as grp WHERE BINARY grp.`group_int_id`= AND BINARY grp.group_int_id=asg.group_int_id AND BINARY asg.`topic_id` = top.`topic_id` UNION SELECT 2 AS isassign, top.`topic_id`,top.`topic_name`,top.`sort_order`FROM `wp_9if2ry_topics` as top, `wp_9if2ry_group_topics` as asg, `wp_9if2ry_groups` as grp WHERE BINARY grp.`group_int_id`= AND BINARY grp.parent_group=asg.group_int_id AND BINARY asg.`topic_id` = top.`topic_id` UNION SELECT DISTINCT 0 AS isassign, top.topic_id, top.topic_name,top.`sort_order` FROM `wp_9if2ry_topics` AS top, `wp_9if2ry_topic_cats` AS tc, `wp_9if2ry_categories` AS cat LEFT JOIN `wp_9if2ry_opt_ins` AS opt ON cat.opt_int_id = opt.opt_int_id WHERE (top.`comp_int_id` = "" ) AND top.topic_id = tc.topic_id AND cat.cat_id = tc.cat_id AND top.topic_id NOT IN ( SELECT asg.topic_id FROM `wp_9if2ry_group_topics` as asg, `wp_9if2ry_groups` as grp WHERE BINARY grp.group_int_id = AND BINARY (grp.group_int_id=asg.group_int_id OR grp.parent_group=asg.group_int_id)) ORDER BY `sort_order`,`topic_name`