PugJr Posted March 7, 2009 Share Posted March 7, 2009 $result = mysql_query("SELECT * FROM example WHERE id='$id'") Okay that you could say is a rather generic mysql_query. My question is, how would you do a range on that? Like $id is 3 to 7 and it selects each indiviual one. How would one do that? Or if there is another way to do along that would be great but right now I have like 4 queries for each ID and I'm sure there has to be another way. Thanks. Quote Link to comment https://forums.phpfreaks.com/topic/148380-solved-how-to-make-a-range-on-mysql_query/ Share on other sites More sharing options...
Mchl Posted March 7, 2009 Share Posted March 7, 2009 http://dev.mysql.com/doc/refman/5.0/en/select.html See LIMIT clause Quote Link to comment https://forums.phpfreaks.com/topic/148380-solved-how-to-make-a-range-on-mysql_query/#findComment-779039 Share on other sites More sharing options...
PugJr Posted March 7, 2009 Author Share Posted March 7, 2009 Thanks! Quote Link to comment https://forums.phpfreaks.com/topic/148380-solved-how-to-make-a-range-on-mysql_query/#findComment-779095 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.