Jump to content


Photo

Message: Resource id#3


  • Please log in to reply
3 replies to this topic

#1 gerrydewar

gerrydewar
  • Members
  • PipPipPip
  • Advanced Member
  • 36 posts

Posted 17 March 2006 - 11:32 PM

I'm making a simple query to my database and receiving a code:Resource id#3 as my output. Does anyone know what this means?

I've tried to post the code i'm using but i keep getting the following error when my code is included in this thread:

Not Acceptable
An appropriate representation of the requested resource /forums/index.php could not be found on this server.







#2 kenrbnsn

kenrbnsn
  • Staff Alumni
  • Advanced Member
  • 8,235 posts
  • LocationHillsborough, NJ, USA

Posted 18 March 2006 - 12:30 AM

You are probably doing (can't post any code :-( )

$rs = mysql query ("string")

echo $rs;

You need to fetch the rows after the query.


Ken

#3 gerrydewar

gerrydewar
  • Members
  • PipPipPip
  • Advanced Member
  • 36 posts

Posted 18 March 2006 - 10:54 AM

I was doing what you said i was so i added the following:

while($row=mysql_fetch_array($result,MYSQL_ASSOC)){
echo $row;
}


Now i get the word 'Array' as my output.




#4 gerrydewar

gerrydewar
  • Members
  • PipPipPip
  • Advanced Member
  • 36 posts

Posted 18 March 2006 - 11:13 AM

Fixed it. Just took out the MYSQL_ASSOC from the while loop and it worked. Thanks to Ken and Barand for posting that nice tutorial on the other thread.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users