Here's some code that might help:
Add the lines below in your search_results screen
After line 139 add:
if (empty($pp)) $pp = 3;
if (empty($sort)) $sort = "desc";
if (empty($offset)) $offset = 0;
$amount = @mysql_query("SELECT count(*) FROM item WHERE Name like
'%$inputKeywords%'") or die("Problem making query.");
$am = mysql_fetch_array($amount);
$pages = ceil($am["0"] / $pp);
find this line:
/*
** Since we'll be using eregi for search functionality, we might
as well
** just go ahead a retrieve all the items from the database.
*/
and change it to this:
$Query = "SELECT ID, Name, Description, Thumbnail, Keywords ";
$Query .= "FROM item ";
$Query .= "WHERE Name like '%$inputKeywords%' ";
$Query .= "ORDER BY DisplayPrecedence, Name $sort LIMIT $offset,
$pp";
then find this line:
/* else, just move on to the next item. */
and add this:
print "<b>Pages: </b>";
for($i = 0; $i < $pages; $i++) {
$p_offset = $i * $pp;
$actual = $i + 1;
print "[<a
href=\"index.php3?SCREEN=search_results&inputKeywords=$inputKeywords&
SearchType=simple&sort=$sort&offset=$p_offset&pp=$pp\"> $actual </a>] ";
}
Let me know if you have any troubles with this code.
Joker Joe
http://www.ispestore.com
http://www.parcargo.com
------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Site: http://www.working-dogs.com/freetrade/
Problems?: [EMAIL PROTECTED]