AbydosGater Posted April 10, 2006 Share Posted April 10, 2006 Hello,My script is as follows...[code]<?phpmysql_connect("localhost", "stargate_admin", "") or die(mysql_error());mysql_select_db("stargate_abydosgaters") or die(mysql_error());$welcome = mysql_query("SELECT * FROM configWHERE id='1'") or die(mysql_error()); ?>[/code]Ok,and in my database,We have two tables id, and welcome message,but if you go to www.abydosgaters.comin the marquee at the top, there is this weird "Resource Id #6" Why am i getting this and not my welcome message? Quote Link to comment https://forums.phpfreaks.com/topic/7033-my-script-is-pulling-some-wierd-info/ Share on other sites More sharing options...
wickning1 Posted April 10, 2006 Share Posted April 10, 2006 mysql_query does NOT return the answer you are looking for. It returns a resource that contains lots of information about the query.To get a row of data out of the resource, you use a fetch function like mysql_fetch_array(). To get the second row, you use mysql_fetch_array() again. The third, again. Or you put it at the top of a loop. Quote Link to comment https://forums.phpfreaks.com/topic/7033-my-script-is-pulling-some-wierd-info/#findComment-25558 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.