Ok so I have these lines:
$picqry = "SELECT pics_file,kids_placed,kids_name FROM {$dbkids} INNER JOIN {$dbkidpics} ON idwaiting_kids=pics_kid WHERE idwaiting_kids={$id} AND pics_profile=1";
$picresult = mysql_query( $picqry, $conn );
if( !$picresult ) die('Error in '.__FILE__.' on line '.__LINE__.'<br>('.mysql_errno().') '.mysql_error().'<br>Query: '.$picqry);
Using DIE because I wanted to get the error back while I'm trying to debug (I usually use trigger_error so that it writes to my log). Anyway the die is being triggered and giving me this response:
Error in /xxx/functions.php on line 46
()
Query: SELECT pics_file,kids_placed,kids_name FROM waiting_kids INNER JOIN waiting_pics ON idwaiting_kids=pics_kid WHERE idwaiting_kids=11 AND pics_profile=1
When I copy paste the query, as returned in the die, into phpMyAdmin or MySQL Workbench it works just fine, returning 1 row as expected. As you can see also mysql_errno() and mysql_error() aren't returning anything. So I have no idea why this would be returning false. Any thoughts?