I know this question is asked daily, but my resource is not false.
$query = "SELECT ccnumber,CUID FROM response WHERE CUID <" . $_POST['CUID'] . " ORDER By CUID DESC LIMIT 1";
$result_prev = mysql_query( $query );
if( $result_prev === false )
{
print 'failed: '.$result_prev;
}
if( mysql_num_rows( $result_prev ) > 0 )
{
When this code is run in the website it does not print out "failed:" and when I print the $result_prev it shows Resource id #25.
BUT I still seem to be having issues. The error log has:
PHP Warning: mysql_fetch_assoc() expects parameter 1 to be resource, boolean given in
When I go into myPHP and run the same query I get a result.
I am kinda stuck as to how to figure this out. This is happens three times on the same page. Any help or suggestions would be appreciated.