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 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"); 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 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 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
Archived
This topic is now archived and is closed to further replies.