Wrox Programmer Forums
|
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 9th, 2003, 10:35 PM
Authorized User
 
Join Date: Aug 2003
Posts: 43
Thanks: 0
Thanked 0 Times in 0 Posts
Default how do i display results in serperate pages..?

Hi,

Im doing a search and it is just searching my html pages in my website, and displaying the results if the search matches any of the words in my search field.

The function will loop out when it reaches 10 results, and have a link to display the next results. It will pass that value of the last html page searched, and continue through that function when i click next.

I want to know how do i display the search results in this format with it listing all the pages ie: Pages (26): [1] 2 3 4 » ... Last »

 
Old September 10th, 2003, 12:54 PM
Authorized User
 
Join Date: Aug 2003
Posts: 43
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Nevermind guys, i will try to store the search in a recordset and page it from there. Thanks.

 
Old September 10th, 2003, 01:19 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 836
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Well, if you're pulling rows out of a database, you need two queries: one of them just counts the number of rows in the entire search. This lets you calculate how many pages of results there are. The second query just selects the subset of that result you need. Typically, you'll need a LIMIT and/or OFFSET clauses for this.

If you're just searching through text files in your filesystem, the approach should be the same -- it's much less efficient to store the results of an entire search in memory when you're only really going to work with a couple of them.


Take care,

Nik
http://www.bigaction.org/
 
Old September 10th, 2003, 03:18 PM
Authorized User
 
Join Date: Aug 2003
Posts: 43
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Ok. Heres the situation. I am able to get rid of the html tags so that it would not search the html tags when I am using my text search approach.

The only problem that I am having now is that its not searching the content of my website, but its also searching the menus that I have on the side. Which means, it will pull up all the pages because there is a menu option on every page. FOr instance on the side panel i could have links to different pages on my website, and the side panel links would be on every page. SO the search results will not be unique and pull up all the pages up.

Is there anyway to solve this problem?






Similar Threads
Thread Thread Starter Forum Replies Last Post
display results carswelljr ASP.NET 2.0 Basics 1 April 19th, 2007 09:46 AM
Display results from a database on multiple pages osemollie PHP How-To 1 January 27th, 2006 07:58 AM
How do I display search results... aspiretech9 PHP How-To 1 April 26th, 2005 10:12 AM
How do I display search results... aspiretech9 Beginning PHP 1 April 25th, 2005 04:59 PM
How do I display search results... aspiretech9 PHP Databases 1 April 25th, 2005 12:11 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.