retrieving data from db

Links for php scripts

Moderators: macek, egami, gesf

Post Reply
User avatar
freshnet
php-forum Active User
php-forum Active User
Posts: 342
Joined: Tue Feb 22, 2011 8:19 am
Location: Canada

Re: retrieving data from db

Post by freshnet » Wed Sep 19, 2012 5:27 am

You can't do this with the SQL, you'd need to return the result set and create a new page for every 5 rows. The best way to do that probably is to have a row counter variable that increments every time you output a result, and create a new page when that variable gets to 5, then reset the variable to 1.

User avatar
TomCornar
New php-forum User
New php-forum User
Posts: 25
Joined: Fri Sep 14, 2012 12:06 am

Re: retrieving data from db

Post by TomCornar » Fri Sep 21, 2012 2:47 am

hi,you have to use pagination .check this link,

http://www.roseindia.net/sql/mysql-exam ... tion.shtml

hope this helps.

Regards,
Tom Cornar
Trinay Technology Solutions
http://www.trinay.com

BrianAlan
New php-forum User
New php-forum User
Posts: 6
Joined: Mon Aug 13, 2012 2:03 am

Re: retrieving data from db

Post by BrianAlan » Wed Sep 26, 2012 5:45 pm

a row counter variable that increments every time you output a result, and create a new page when that variable gets to 5, then reset the variable to 1.





-------------------------------
http://www.wholesaledvdsales.co.uk/

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests