Hi all,
in my query I am using a NOT IN statement as follows:
$sql7 = "SELECT id FROM table where (status = '$status1') AND (title like '%$searchstring[$j]%' and id NOT IN('$returned_string')) ORDER BY enddate ASC";
The variable '$returned_string' contains "91,83,73,74,76" and the query only seems to see the "91" so it doesn't return records where the id = 91 but it does for the other numbers in the string ??
I have tried moving the brackets around but that does not do much. Am I expecting this statement to work in a way it is not supposed to or is there a problem, maybe another way to achieve the same result ?
Thanks heaps for any help.