[PHP-DB] Re: efficient next/prev page generation

2003-02-14 Thread David Chamberlin
Just reviewed my post (should do that *before* hitting submit ... sigh ). One minor note, which should be obvious, but just for completeness: David Chamberlin wrote: 1.SELECT * FROM table 2. get the number of rows from result 3. figure out paging scheme 4. SELECT desired data FROM table LIMIT

[PHP-DB] Re: efficient next/prev page generation

2003-02-14 Thread no-spam----me
SELECT COUNT(*) FROM table (only on initial page). Then pass that count from page to page. Then only one query will be necessary for subsequent page requests. The count will not always be accurate if records are added during the users visit. But it's a quicker solution. David Chamberlin