OutFront Forums
     Home    Register     Search      Help      Login    

Sponsors
Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax
Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.
Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Follow Us
On Facebook
On Twitter
RSS
Via Email

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

 

Multiple Search Fields

 
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, PHP, and Database >> Multiple Search Fields
Page: [1]
 
 
mwackers

 

Posts: 8
Joined: 2/11/2009
Status: offline

 
Multiple Search Fields - 2/11/2009 11:55:52   
I'm trying to get results back from multiple search fields (Applicant_First_Name, Applicant_Last_Name and Applicant_Company_Name)

If all the fields have data, it is returned as result.
Applicant_First_Name- John
Applicant_Last_Name- Smith
Application_Company_Name- Smith and Sons Co.

If one of the fields is blank, it is not returned as a result.
Applicant_First_Name- John
Applicant_Last_Name- Smith
Application_Company_Name-

I've reviewed the following post, but I can't figure how to apply the solution to my problem.
http://www.frontpagewebmaster.com/m-237358/mpage-1/key-/tm.htm#237371

I'm a first-timer and using Frontpage with DRW.

http://www.middletownplanning.com/permit_quick_applicant.asp

Here is the Code.

<% end if %>
<%
fp_sQry="SELECT * FROM Results WHERE (Applicant_First_Name LIKE '%::Applicant_First_Name::%' AND Applicant_Last_Name LIKE '%::Applicant_Last_Name::%' AND Applicant_Company LIKE '%::Applicant_Company::%') ORDER BY Property_Street_Name ASC,Property_Street_Number ASC,App_Year ASC,App_Type ASC,App_Number ASC"
fp_sDefault="Applicant_First_Name=&Applicant_Last_Name=&Applicant_Company="
fp_sNoRecords="No records returned."
fp_sDataConn="permit_Data_entry"
fp_iMaxRecords=0
fp_iCommandType=1
fp_iPageSize=0
fp_fTableFormat=False
fp_fMenuFormat=False
fp_sMenuChoice=""
fp_sMenuValue=""
fp_iDisplayCols=16
fp_fCustomQuery=False
BOTID=0
fp_iRegion=BOTID
%>

< Message edited by mwackers -- 2/11/2009 12:07:11 >
BeTheBall

 

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

 
RE: Multiple Search Fields - 2/11/2009 19:29:41   
Welcome to OutFront.

I tried it by only filling out one field and it worked for me. I searched on just "John" in the first field and got results. I then tried with just Williams in the second field and again got results. Am I missing something or did you fix it after you posted?

_____________________________

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 mwackers)
mwackers

 

Posts: 8
Joined: 2/11/2009
Status: offline

 
RE: Multiple Search Fields - 2/12/2009 11:06:18   
Here is an example that hopefilly will clarify the problem.

If you do a search for 35 Afton Terrace on the following page:
http://www.middletownplanning.com/permit_quick_Street_Address.asp

You will get a result with the applicant and property owner by the name of Edward Rankins.

However, if you search for Edward Rankins on the applicant search page:
http://www.middletownplanning.com/permit_quick_applicant.asp

You will not get a result back. The search will not return results where one of the data fields is blank.

How can I allow a blank data field, if the other search criteria are met, to return all results and not use OR.

Thanks,
Michiel

(in reply to mwackers)
BeTheBall

 

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

 
RE: Multiple Search Fields - 2/12/2009 18:55:17   
I think the problem is your data, not the search. If you look in the table named Results, I doubt you will find a record where the Applicant_Last_Name field is Rankins, therefore, no result is returned.

_____________________________

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 mwackers)
Page:   [1]

All Forums >> Web Development >> ASP, PHP, and Database >> Multiple Search Fields
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