faqts : Computers : Programming : Languages : PHP : Database Backed Sites : MySQL

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

3 of 6 people (50%) answered Yes
Recently 2 of 5 people (40%) answered Yes

Entry

I build a recordset of names ordered by lastname, I want to display that RECORDSET in blocks of 10. Not a TABLE. Help!

Oct 16th, 2001 06:53
John Lim, steve moffat,


There are many solutions to this problem. The key thing is to break up 
your recordset into multiple pages. Then store the current page you are 
on in a session variable or in your anchor tags. Create next and 
previous links and use  SELECT LIMIT to retrieve the records you want 
based on the next/prev link that they click and the current page you 
are on.
The ADODB database wrapper library allows you to do this (includes 
instructions also!) http://php.weblogs.com/ADODB_manual#ex8
Alternatively, there is a commercial PHP software that can do this and 
more at http://phplens.com/