|
| |
|
|
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!
|
|
|
|
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 %>
|
|
|
|
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.
|
|
|
|
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!!!!!!!
|
|
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
|
|
|