Re: Pagination need help again

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



* Scott McWhite <smcwhite@xxxxxxxxx>:

> I'm using an HTML search form that passes the "searchterm" to a php
> file.
>
> In my case the "searchterm" can have 1000s of records in my database,
> so I implemented a limit which displays 20 records per page.  The
> pagination function works fine with one exception.  Example of my
> problem: searchterm typed in the html search form equals "ford", in
> the database there are 2000 fords, the first page displays 20 fords
> and then the next page forgets that we are searching "fords" and
> displays the equivalent to a wildcard "%"
>
> search and displays accordingly. 

I use PEAR's Pager class for this sort of thing. It's highly
configurable -- which means it may take a few tries to get it working
with your own code, but it *will* work, eventually. Browse for the Pager
class at http://pear.php.net -- look in the HTML category.

-- 
Matthew Weier O'Phinney           | mailto:matthew@xxxxxxxxxx
Webmaster and IT Specialist       | http://www.garden.org
National Gardening Association    | http://www.kidsgardening.com
802-863-5251 x156                 | http://nationalgardenmonth.org

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux