[thelist] My Query string not getting results in pages

J Paul Armstrong jpaul at jpauldesign.com
Mon Nov 18 15:09:01 CST 2002


Page Numbering in MySQL results pages (used for a small book catalog search)
:
I have a query string that selects based on the search the user does; which
works. When I've implemented the page/limit results, when you click on any
of the page numbers, the query string stops working. Here is the query ...

{
$query="select * from book_catalog where last like '%".$searchterm."%' or
first like '%".$searchterm."%' or title like '%".$searchterm."%' or genre
like '%".$searchterm."%' order by last";
}


else
{
$query="select * from book_catalog where ".$searchtype." like
'%".$searchterm."%' order by last";
}

$result = mysql_query($query);
$num_results = mysql_num_rows($result);


All the results come up fine, based on the code provided, the first time you
search and get results. But when you click on any of the page numbers, the
query seems not to work anymore - where the keyword field is blank, it
doesn't seem to understand that anymore (where it does the first time you
search). I get errors. Here's the link to try it out ...


http://www.mercantilelibrary.com/catalog/searchtest.php



Thanks for the help in advance.


++ jpaul design  |  simplify
        [ www.jpauldesign.com ]

        ++ 513.531.4849
           204.209.0219

        ++ 3763 mt vernon ave
           cincinnati, oh
           45209




More information about the thelist mailing list