I have a boolean field, which seems to be stored as 1 when true.
When trying to grab that field in a while loop, I get the error:
mysql_fetch_array() expects parameter 1 to be resource, boolean given
Should a boolean be stored as "TRUE" instead of "1"?
Otherwise, why would I be getting this error?
edit:
My code:
$sqltotal = mysql_query("SELECT SUM(cost) as total FROM sales where passport = '{$therecord['passport']}' AND {$therecord['paid']} <> 1");
$row = mysql_fetch_array($sqltotal);