Results 1 to 11 of 11
Mar 21, 2013, 03:33 #1
- Join Date
- Apr 2005
- 3 Post(s)
- 0 Thread(s)
Really stupid debugging question because I'm losing my mind
I'm trying to debug some code from previous developer (ie I wouldn't normally program like this) and I've got an error I just can't get rid of. The code below results in the output beneath it.
What I can't figure out is how execution gets to the point of error, because the query result has already been checked (and output). Basically I'm confused and am losing the plot. Can anyone help?
$res = mysql_query($query);
if(!$res) continue; //skip out of this loop iteration
$rows = mysql_num_rows($res);
echo "Res : ";
while ($row = mysql_fetch_array($res)) //this is line 125
Res : resource(22) of type (mysql result) PHP Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in <snip />/getDetails.php on line 125
Last edited by DaveMaxwell; Mar 21, 2013 at 06:49. Reason: removed URL for security concerns....