thugsr Posted January 29, 2012 Share Posted January 29, 2012 hi guy's i have on one page select from table, and i don't know how to limit showing content from database on 3, and rest to make number under it and when i click on that number next 3 is showen? Something like on forum when you have more topics then you can show, on botom of page are showen numbers (links). Can some explain me how to do this? i put in while loop something like this while ($prom = mysql_fetch_object($res) and $i<3) and now it is limited on showing first 3, my problem is showing next 3, and if there is more how to split it on 3 per page? Link to comment https://forums.phpfreaks.com/topic/255975-number-of-pages/ Share on other sites More sharing options...
litebearer Posted January 29, 2012 Share Posted January 29, 2012 pagination... example = http://www.nstoia.com/sat/disp_pag/ Link to comment https://forums.phpfreaks.com/topic/255975-number-of-pages/#findComment-1312161 Share on other sites More sharing options...
thugsr Posted January 29, 2012 Author Share Posted January 29, 2012 is there any simpler way to do that? Link to comment https://forums.phpfreaks.com/topic/255975-number-of-pages/#findComment-1312203 Share on other sites More sharing options...
PFMaBiSmAd Posted January 29, 2012 Share Posted January 29, 2012 The proper way to do what you are asking is to use a LIMIT clause in your query that gets just the rows you are interested in. Here is the phpfreaks basic pagination tutorial - http://www.phpfreaks.com/tutorial/basic-pagination Link to comment https://forums.phpfreaks.com/topic/255975-number-of-pages/#findComment-1312206 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.