Resource ID #

Hi all, when out putting data to my webpage i keep getting “resource id #” and then a number that seems to be counting up with each one that is displayed. I can only assume its struggling to display what ever it is that it need to display OR there is nothing to display ???

This is the code that is generating the output.

<?php $loc = mysql_query("select * from squares where callsign like '%$dxcall%' limit 1"); While ($r1 = mysql_fetch_array($loc)) { $call = $r1["call"]; $loc = $r1["loc"]; $other = $r1["other"]; } ?>

thanks all !!

Typical i post this then fix it, so here is what i had to change.

From looking harder in to this the problem was that when it was unable to display any data then it showed as “resource id#”

I have change this

While ($r1 = mysql_fetch_array($loc))

to this

$r1 = mysql_fetch_array($loc);

Works perfect.

Hope this helps someone else !!!


Sponsor our Newsletter | Privacy Policy | Terms of Service