mpharo Posted April 16, 2007 Share Posted April 16, 2007 hello, I am working on a site to display thousands of results....I have all of that working but I want to limit the results to 50 at a time...any suggestions on how to browse the results with a limit of 50....I am thinking about checking the value of a number and while it is less than the total count of rows in the query increment it by 50....if anyone has a snippet it would be appreciated. Link to comment https://forums.phpfreaks.com/topic/47289-solved-limit-sql-results/ Share on other sites More sharing options...
Psycho Posted April 16, 2007 Share Posted April 16, 2007 There are a couple of tutorials on this site for doing just that: http://www.phpfreaks.com/tutorial_cat/25/Page-Number--Pagination.php Link to comment https://forums.phpfreaks.com/topic/47289-solved-limit-sql-results/#findComment-230665 Share on other sites More sharing options...
pocobueno1388 Posted April 16, 2007 Share Posted April 16, 2007 You need to look into "pagination". Unless you just want 50 results...then just put this code in your query. $query = mysql_query("SELECT col1 FROM table WHERE condition LIMIT 50"); That would ONLY give you 50 results...but I think you are wanting pagination. PHPfreaks has a good tutorial on that. Link to comment https://forums.phpfreaks.com/topic/47289-solved-limit-sql-results/#findComment-230666 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.