Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Searching a Flat File
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Searching a Flat File

 Post Reply Post Reply Page  <12
Author
wolfie View Drop Down
Groupie
Groupie


Joined: 18 November 2002
Location: United Kingdom
Status: Offline
Points: 64
Post Options Post Options   Thanks (0) Thanks(0)   Quote wolfie Quote  Post ReplyReply Direct Link To This Post Posted: 01 March 2005 at 4:50pm
Well, had a look around a few script sites and they works mostly on files. The flat file doesn't work with any that I tried. They return the default page and not the querystring...

Could it be I am asking too much here?
Wolfie--[ WolfWeb.co.uk ]
PHP, .net--[ beginner ] ASP, VB, C, SQL--[ intermediate ] X/D/HTML, CSS, WML, XML--[
Back to Top
dpyers View Drop Down
Senior Member
Senior Member


Joined: 12 May 2003
Status: Offline
Points: 3937
Post Options Post Options   Thanks (0) Thanks(0)   Quote dpyers Quote  Post ReplyReply Direct Link To This Post Posted: 01 March 2005 at 5:04pm

I think we're having a terminology problem.

First I thought you had all the words and links in one "directory file"
Then I thought you wanted to search within all files on your system. My thought now is that all your files are contained within one file - e.g. a flat file system.
 
Are you using anything specific for your flatfile system - e.g. LDAP - or something from a specific vendor?
 

Lead me not into temptation... I know the short cut, follow me.
Back to Top
wolfie View Drop Down
Groupie
Groupie


Joined: 18 November 2002
Location: United Kingdom
Status: Offline
Points: 64
Post Options Post Options   Thanks (0) Thanks(0)   Quote wolfie Quote  Post ReplyReply Direct Link To This Post Posted: 01 March 2005 at 5:10pm
Give you the code...
http://www.wolfweb.co.uk/default.txt

Edit: That is all my code, no package was used.


Edited by wolfie - 01 March 2005 at 5:25pm
Wolfie--[ WolfWeb.co.uk ]
PHP, .net--[ beginner ] ASP, VB, C, SQL--[ intermediate ] X/D/HTML, CSS, WML, XML--[
Back to Top
dpyers View Drop Down
Senior Member
Senior Member


Joined: 12 May 2003
Status: Offline
Points: 3937
Post Options Post Options   Thanks (0) Thanks(0)   Quote dpyers Quote  Post ReplyReply Direct Link To This Post Posted: 02 March 2005 at 2:00am
OK, I think I see what you're trying to do now.
 
  • You have 1 asp page with a bunch of if statements.
  • A paticular if statement will execute depending on the value of "page" in the query string.
  • Each if statement either writes html directly or queries a data base to get data to write.
  • The net reult is that the code to produce all possible pages is within a single page but only one section of page code is executed at a time.
The only way you're going to be able to search all pages is to expand the ones that have data pulled from a db. I'll put together some code to loop through your possible pages for a search term and redirect accordingly.
 

Lead me not into temptation... I know the short cut, follow me.
Back to Top
dpyers View Drop Down
Senior Member
Senior Member


Joined: 12 May 2003
Status: Offline
Points: 3937
Post Options Post Options   Thanks (0) Thanks(0)   Quote dpyers Quote  Post ReplyReply Direct Link To This Post Posted: 02 March 2005 at 3:13am
Search App
 
search.htm is the form that takes a search term and calls search.asp which returns a list links to your pages containing the search term.

Lead me not into temptation... I know the short cut, follow me.
Back to Top
wolfie View Drop Down
Groupie
Groupie


Joined: 18 November 2002
Location: United Kingdom
Status: Offline
Points: 64
Post Options Post Options   Thanks (0) Thanks(0)   Quote wolfie Quote  Post ReplyReply Direct Link To This Post Posted: 02 March 2005 at 6:36am
Dude! You rock! That's just what I wanted!

I owe you a big one.
Wolfie--[ WolfWeb.co.uk ]
PHP, .net--[ beginner ] ASP, VB, C, SQL--[ intermediate ] X/D/HTML, CSS, WML, XML--[
Back to Top
 Post Reply Post Reply Page  <12

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.