Nothadoth Posted July 3, 2007 Share Posted July 3, 2007 im using this (everything connects to the database mysql_query("SELECT * FROM nav ORDER BY id ASC LIMIT 5 WHERE type='site'"); can someone tell me why it wont work :S the table nav exists. the column 'type' exists. and id. it says: Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/westmids/public_html/en/header.php on line 33 Quote Link to comment https://forums.phpfreaks.com/topic/58334-solved-using-where-in-mysql_query/ Share on other sites More sharing options...
no_one Posted July 3, 2007 Share Posted July 3, 2007 It's in the wrong place mysql_query("SELECT * FROM nav WHERE type='site' ORDER BY id ASC LIMIT 5"); Quote Link to comment https://forums.phpfreaks.com/topic/58334-solved-using-where-in-mysql_query/#findComment-289245 Share on other sites More sharing options...
teng84 Posted July 4, 2007 Share Posted July 4, 2007 no need to write ASC its the default Quote Link to comment https://forums.phpfreaks.com/topic/58334-solved-using-where-in-mysql_query/#findComment-289255 Share on other sites More sharing options...
Nothadoth Posted July 4, 2007 Author Share Posted July 4, 2007 thanks guys Quote Link to comment https://forums.phpfreaks.com/topic/58334-solved-using-where-in-mysql_query/#findComment-289259 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.