gerrydewar Posted March 17, 2006 Share Posted March 17, 2006 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 AcceptableAn appropriate representation of the requested resource /forums/index.php could not be found on this server. Link to comment https://forums.phpfreaks.com/topic/5199-message-resource-id3/ Share on other sites More sharing options...
kenrbnsn Posted March 18, 2006 Share Posted March 18, 2006 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 Link to comment https://forums.phpfreaks.com/topic/5199-message-resource-id3/#findComment-18478 Share on other sites More sharing options...
gerrydewar Posted March 18, 2006 Author Share Posted March 18, 2006 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. Link to comment https://forums.phpfreaks.com/topic/5199-message-resource-id3/#findComment-18536 Share on other sites More sharing options...
gerrydewar Posted March 18, 2006 Author Share Posted March 18, 2006 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. Link to comment https://forums.phpfreaks.com/topic/5199-message-resource-id3/#findComment-18538 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.