Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - 13 options search
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

13 options search

 Post Reply Post Reply
Author
jellejacob View Drop Down
Newbie
Newbie
Avatar

Joined: 19 June 2002
Location: Netherlands
Status: Offline
Points: 10
Post Options Post Options   Thanks (0) Thanks(0)   Quote jellejacob Quote  Post ReplyReply Direct Link To This Post Topic: 13 options search
    Posted: 03 July 2003 at 3:04am

Hi everybody,

I'm trying to build a searchpage on which a user can select 13 possible options including 3 between options and a keyword field for searching the whole table.

Is anyone familiar with a searchpage of this kind and what's the "best" way of doing this? Do I have (or not) to pre-code all the possible combinations/options with AND's or OR's?

I hope someone can give me a kick in the right direction.

Thanks in advance



Edited by jellejacob
Back to Top
ultramods View Drop Down
Groupie
Groupie
Avatar

Joined: 08 January 2003
Location: Scotland
Status: Offline
Points: 146
Post Options Post Options   Thanks (0) Thanks(0)   Quote ultramods Quote  Post ReplyReply Direct Link To This Post Posted: 03 July 2003 at 8:55am

Try

Dim sql, keyword, sql3

sql = "SELECT * FROM YOUR TABLE"

sql3=""

'then read in form data

keyword = Trim(Request.Form("keyWord")

IF keyWord <> "" THEN

 sql2 = sql2 &  " keyword=' " & keyWord & " ' AND"

END IF

'Then once you have got all the form data etc(if any)

IF sql3 <> "" THEN

'get rid of the last and in the string                                             sql3 = Left(sql3, Len(sql3)-4)

sql = sql & " WHERE " & sql3

END IF

This is very basic, but you can build it up



Edited by ultramods
Back to Top
 Post Reply Post Reply

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.