I’m working with a table (“Item”) which has the field “Aprovado” and it’s an integer that checks if the item is approved or not (1 for yes, 0 for no) (not my table, I would have chosen proper boolean).
I know there are items there, and I know there are lots of items with “Aprovado” set to 1. (I am successful with queries “SELECT * FROM Item ORDER BY ItemID ASC”)
yet, when I do:
mysql_select_db($theDatabase, $db) or die("Could not find database.");
$query = "SELECT * FROM Item WHERE Aprovado = 1";
$resultID = mysql_query($query, $db) or die("Data not found.");
It just returns “Data not Found.” What’s wrong?
Could try changing your die(…) into:
That will show you the actual MySQL error.