I have a mysql query that throws an error which I'm guessing is because of my judicious use of the phrase "NOT IN":
$sqlGetCountry = mysqli_query($link, "SELECT * FROM locations WHERE country='$country' AND CURTIME() > time AND '$state' NOT IN state ORDER BY time desc LIMIT 20");
$sqlNumCountry = mysqli_num_rows($sqlGetCountry);
I have a table with city, state, and country and I'm basically trying to find the queries where a given state ($state in this case, which could be Texas, Hawaii, etc.) is not in the results. I get the error:
mysqli_num_rows() expects parameter 1 to be mysqli_result, boolean given
Anybody have a clue?
$state? Or if$statedoesn't exist in the entire table?state? Is it a column? A table?