HighDots Forums  

searching between entered values (max and min)

Macromedia Dreamweaver Macromedia Dreamweaver Discussions (macromedia.dreamweaver)


Discuss searching between entered values (max and min) in the Macromedia Dreamweaver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
dukla
 
Posts: n/a

Default searching between entered values (max and min) - 01-05-2006 , 08:51 AM






Hi there,

I am currently investigating adding some search functionality to a database
driven website.

The site is an image gallery site, but we would like to be able to search for
photos of geaographical locations around any given point, or grid reference.

So we would need to have a search akin to the one here :

http://atsearch.autotrader.co.uk/www/cars_search.asp

ie where you could enter a max and min value and the search would bring up all
matching results between the two values.

For projects I've done so far I've deployed Tom Muck's search extension, which
works great for searching on any words, all words, or exact phrase.

Is this extra functionality easily enough added? I'm kind of familiar with
some ASP and SQL, as its generated by DW for editing, but I'm not yet at a
level where I can really get very far in terms of handcoding.

Any pointers on this greatly appreciated.

Cheers,
Iain



Reply With Quote
  #2  
Old   
Nancy Gill
 
Posts: n/a

Default Re: searching between entered values (max and min) - 01-05-2006 , 09:21 AM






You would make your text boxes for minimum and maximum value and name them
accordingly. The SQL for the recordset would be something like

SELECT records
FROM table
WHERE LocationID > minvalue AND LocationID < maxvalue

Then set the variables minvalue and maxvalue to Request.Form("textbox1") and
Request.Form("textbox2").

Something like that.


--
Nancy Gill
Team Macromedia Volunteer for Dreamweaver MX/UltraDev
http://www.macromedia.com/go/team/
BLOG: http://www.dmxwishes.com/blog.html
Co-Author: Dreamweaver MX: Instant Troubleshooter (August, 2003)
Technical Editor: DMX 2004: The Complete Reference, DMX 2004: A Beginner's
Guide, Mastering Macromedia Contribute
Technical Reviewer: Dynamic Dreamweaver MX/DMX: Advanced PHP Web Development


"dukla" <webforumsuser (AT) macromedia (DOT) com> wrote

Quote:
Hi there,

I am currently investigating adding some search functionality to a
database
driven website.

The site is an image gallery site, but we would like to be able to search
for
photos of geaographical locations around any given point, or grid
reference.

So we would need to have a search akin to the one here :

http://atsearch.autotrader.co.uk/www/cars_search.asp

ie where you could enter a max and min value and the search would bring up
all
matching results between the two values.

For projects I've done so far I've deployed Tom Muck's search extension,
which
works great for searching on any words, all words, or exact phrase.

Is this extra functionality easily enough added? I'm kind of familiar with
some ASP and SQL, as its generated by DW for editing, but I'm not yet at a
level where I can really get very far in terms of handcoding.

Any pointers on this greatly appreciated.

Cheers,
Iain





Reply With Quote
  #3  
Old   
dukla
 
Posts: n/a

Default Re: searching between entered values (max and min) - 01-05-2006 , 11:02 AM



Thanks Nancy - that makes pretty good sense, and doesn't sound too tricky.

Would that go in the page with the search form, or in the results page?

I can usually get things working eventually, but often have terrible trouble
getting exactly the right code in exactly the right place!

Iain


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.