Right... sorry. Can you verify that the $Groups var is populated?
Basically this:
<br />for ($i=0; $i<$gsize;$i++) { <br /> if (!preg_match("/[0-9]/",$Grouparray[$i])) { continue; }; <br /> $g++; <br /> if ($g > 1) { <br /> $groupquery .= " OR "; <br /> } <br /> $groupquery .= "Bo_Read_Perm LIKE '%-$Grouparray[$i]-%'"; <br /> } <br /> is either not getting entered due to no groups assigned, or the groups value is not delimited by "-".