a webmaster learning community
     Home    Register     Search      Help      Login    
FrontPage Alternative
Sponsors

Hosting from $3.99 per month!

Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions. dd

Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

Search Forums
 

Advanced search
Recent Posts

 Todays Posts
 Most Active posts
 Posts since last visit
 My Recent Posts
 Mark posts read

 

2 search fields: can they work in tandem?

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> ASP and Database >> 2 search fields: can they work in tandem?
Page: [1]
 
blankbandit

 

Posts: 21
Joined: 11/24/2005
Status: offline

 
2 search fields: can they work in tandem? - 12/18/2005 15:35:23   
say you have 2 search boxes in FP, "Field1" and "Field2". Is it possible, and how so, that a user may input criteria into "Field1" and get results; into "Field2" and get results; and into "Field1" AND "Field2" together so that relevant results are specific to BOTH entries? Currently, a user can type into both of my fields, but results are only relevant to the first field, not both.
thanks
fatlardo

 

Posts: 76
Joined: 4/15/2004
From: Shrewsbury
Status: offline

 
RE: 2 search fields: can they work in tandem? - 12/19/2005 10:07:13   
There probably is a way, however I personally cant help you without knowing how you're getting the results in the first place!!
Try posting the code and I'll see what I can do!

(in reply to blankbandit)
blankbandit

 

Posts: 21
Joined: 11/24/2005
Status: offline

 
RE: 2 search fields: can they work in tandem? - 12/19/2005 14:34:39   
Thanks for responding! I'm using an MS Access query as my source in FP and concatenating the first and last names of artists within that query. Here's the code that I have currently:

fp_sQry="SELECT * FROM Master_Query WHERE (Artist LIKE '%::Artist::%' OR Title LIKE '%::Title::%' OR Record_Label LIKE '%::Record_Label::%')"
fp_sDefault="Artist=Null&Title=NUll &Record_Label=Null"
fp_sNoRecords="<tr><td colspan=9 align=left width=""100%"">No records returned.</td></tr>"
fp_sDataConn="Inventory"
fp_iMaxRecords=100000
fp_iCommandType=1
fp_iPageSize=35
fp_fTableFormat=True
fp_fMenuFormat=False
fp_sMenuChoice="ID"
fp_sMenuValue="ID"
fp_sColTypes="&ID=3&Artist=202&Title=202&Record_Label=202&Number=203&Format=202&Description=202&Grade=202&Price=202&Artist_Last=202&Artist_First=202&Genre=202&"
fp_iDisplayCols=9
fp_fCustomQuery=False
BOTID=0
fp_iRegion=BOTID
%>

(in reply to blankbandit)
BeTheBall

 

Posts: 6385
Joined: 6/21/2002
From: West Point Utah USA
Status: offline

 
RE: 2 search fields: can they work in tandem? - 12/19/2005 15:38:08   
Does this work?

SELECT * FROM Master_Query WHERE (Artist LIKE '%::Artist::%' AND Title LIKE '%::Title::%' AND Record_Label LIKE '%::Record_Label::%')"
fp_sDefault="Artist=&Title=&Record_Label="


_____________________________

Duane

Some people are like Slinkies . . . Not really good for anything . . . . . But they still bring a smile to your face when you push them down a flight of stairs.

(in reply to blankbandit)
blankbandit

 

Posts: 21
Joined: 11/24/2005
Status: offline

 
RE: 2 search fields: can they work in tandem? - 12/19/2005 17:05:40   
Wow! Yeah, that worked. All I had to do was use the "AND" instead of the "OR"? Geeze, I'm such a beginner. Thanks!!!!!!!

(in reply to BeTheBall)
Page:   [1]
OutFront Discoveries

All Forums >> Web Development >> ASP and Database >> 2 search fields: can they work in tandem?
Page: [1]
Jump to: 1





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts