MySQL ERROR:

Error Number: 1064

Description: 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 '=userdata['group_id']?> AND blog_name LIKE 'cp%'' at line 1

Query: SELECT blog_title, blog_url FROM exp_weblogs INNER JOIN exp_weblog_member_groups ON exp_weblogs.weblog_id = exp_weblog_member_groups.weblog_id WHERE exp_weblog_member_groups.group_id=userdata['group_id']?> AND blog_name LIKE 'cp%'