UCC Posted November 16, 2006 Share Posted November 16, 2006 Any time I try and retrieve a simple variable from a select query in my PHP I seem to get these Resource Id #s instead. Heres a simple example. Surely there's something simple I'm missing. Thanks! $loc=$db->query("SELECT cityname from cities WHERE cityid=$ir['location']"); print $loc; Quote Link to comment Share on other sites More sharing options...
Decepti0n Posted November 16, 2006 Share Posted November 16, 2006 Re: Resource id #9 and Similar Goofyness fetch it into an array first $loc=$db->query("SELECT cityname from cities WHERE cityid=$ir['location']"); $array = mysql_fetch_assoc($array); print $array['cityname']; unless you have like $db->array Quote Link to comment Share on other sites More sharing options...
UCC Posted November 16, 2006 Author Share Posted November 16, 2006 Re: Resource id #9 and Similar Goofyness Thanks Deception. :-D Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.