I am aware of that

Ok so how to make it in correct way? I am getting syntax errror.
PHP Code:
$query5 = $vbulletin->db->query("SELECT userid FROM user WHERE userid IN ($user) and membergroupids find_in_set(18, membergroupids)");
while ($row5 = $vbulletin->db->fetch_array($query5)) {
echo $row5['userid'].";";
echo "<br />";
Invalid SQL:
SELECT userid FROM user WHERE userid IN (17291,24998,19,8026,28994,56325) and membergroupids find_in_set(18, membergroupids);
MySQL 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 'find_in_set(18, membergroupids)' at line 1
Error Number : 1064