Help with search results on multiple pages
Posted: Mon Apr 10, 2006 3:36 pm
I am working on a search engine for a client, and for the most part it is working great. The part I need help or suggestions on is with the search results. Right now only the top 10 results are retreived, and displayed on one page. I would like it to retreive ALL results for a given search, display the first 10 on page 1, then subsequent results on pages 2, 3, etc.
Here is the query that is currently being called for the search results:
"yellow" refers to this script's name because it is a yellow pages directory for businesses, there are different categories (electricians, contractors, etc.), and there are different priority levels (standard, gold, platinum, etc). Any help is appreciated, I don't know where to even start.
Oh, you can view the live script here: http://www.nwbuildnet.com/stores/builders/
Thanks in advance!
Mike
Here is the query that is currently being called for the search results:
Code: Select all
$q1 = "select * from yellow_agents, yellow_priority, yellow_categories where yellow_agents.CategoryID = yellow_categories.CategoryID and yellow_agents.PriorityLevel = yellow_priority.PriorityLevel and yellow_agents.AccountStatus = 'active' order by visits desc limit 0,9 ";
$r1 = mysql_query($q1) or die(mysql_error());
$lrows = mysql_num_rows($r1);Oh, you can view the live script here: http://www.nwbuildnet.com/stores/builders/
Thanks in advance!
Mike