So I have a dynamic built query using the 'IN' clause, but really need to select for two parameters, and cannot seem to figure out how to do this.
$selectSql= "SELECT groupid FROM groups WHERE name IN(";
foreach ($groupsArray as $group => $row){
$selectSql .= "'".$row['name']."'".",";
}
$selectSql = rtrim($selectSql, ',');
$selectSql .= ")";
Really, the query needs to look something like:
$selectSql= "SELECT groupid FROM groups WHERE name and type IN(;
How would I go about doing this?
Sincere thanks for any help! it is greatly appreciated.