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? Quote Link to comment 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/ Quote Link to comment 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? Quote Link to comment 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 Quote Link to comment 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.