UCC Posted November 16, 2006 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
Decepti0n Posted November 16, 2006 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
UCC Posted November 16, 2006 Author Posted November 16, 2006 Re: Resource id #9 and Similar Goofyness Thanks Deception. :-D Quote
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.