I have this...
$a1 = "SELECT ID FROM table WHERE NAME LIKE '%".mysql_escape_string($name)."%'";
$a2 = mysql_query ("$a1");
if (mysql_num_rows($a2)==0) echo "NOT FOUND";
while ($row=mysql_fetch_array($a2)){
$recipient = $row[0];
if (!$recipient_array) {
$recipient_array = "'".$recipient."'";
} else {
$recipient_array = $recipient_array.","."'".$recipient."'";
}
}
It will give me a listing like this...
'1','42','322','932'
How do I then write a mysql query to find all records that have at least 1 of these in the colum named "ids"?