Hi, I hope someone can help me sort this out a bit, Im completely lost.
Here is the page I am working on:
http://www.knzbusinessbrokers.com/default.asp
I have 3 search critera that I need to use when querying the database. Right now it is only looking for a match on one of those dropdowns and not all 3. can anyone help?
Here is the code:
<form BOTID="0" METHOD="POST" action="businessforsale_interface/Results/test3.asp">
<input type="hidden" name="fpdbr_0_PagingMove" value=" |< ">
<div align="center">
<table border="0" cellpadding="2" cellspacing="0" width="458">
<tr>
<td width="54" align="center"><font face="Arial" size="2">Type of Business</font></td>
<td width="396">
<nobr>
<!--webbot bot="DatabaseRegionStart" s-columnnames="Key,BusinessName,Category,Address,Sta te,City,County, AskingPrice,Revenues,Annualprofits,Franchise,Prequ alifiedforfinancing" s-columntypes="3,202,202,202,202,202,202,202,202,202 ,202,202" s-dataconnection="businessforsale" b-tableformat="FALSE" b-menuformat="TRUE" s-menuchoice="Category" s-menuvalue="Category" b-tableborder="TRUE" b-tableexpand="TRUE" b-tableheader="TRUE" b-listlabels="TRUE" b-listseparator="TRUE" i-listformat="0" b-makeform="FALSE" s-recordsource="Results" s-displaycolumns="Category" s-criteria s-order s-sql="SELECT Distinct Category FROM Results" b-procedure="FALSE" clientside suggestedext="asp" s-defaultfields s-norecordsfound="No records returned." i-maxrecords="256" i-groupsize="0" botid="2" u-dblib="_fpclass/fpdblib.inc" u-dbrgn1="_fpclass/fpdbrgn1.inc" u-dbrgn2="_fpclass/fpdbrgn2.inc" preview=" <span style="color: rgb(0,0,0); background-color: rgb(255,255,0)">Database</span> " startspan --><!--#include file="_fpclass/fpdblib.inc"-->
<% if 0 then %>
<SCRIPT Language="JavaScript">
document.write("<div style='background: yellow; color: black;'>The Database Results component on this page is unable to display database content. The page must have a filename ending in '.asp', and the web must be hosted on a server that supports Active Server Pages.</div>");
</SCRIPT>
<% end if %>
<%
fp_sQry="SELECT Distinct Category FROM Results"
fp_sDefault=""
fp_sNoRecords="No records returned."
fp_sDataConn="businessforsale"
fp_iMaxRecords=256
fp_iCommandType=1
fp_iPageSize=0
fp_fTableFormat=False
fp_fMenuFormat=True
fp_sMenuChoice="Category"
fp_sMenuValue="Category"
fp_sColTypes="&Key=3&BusinessName=202&Category=202 & Address=202&State=202&City=202&County=202&AskingPr ice=202& Revenues=202&Annualprofits=202&Franchise=202& Prequalifiedforfinancing=202&"
fp_iDisplayCols=1
fp_fCustomQuery=False
BOTID=2
fp_iRegion=BOTID
%>
<!--webbot bot="DatabaseRegionStart" endspan i-checksum="21056" --><select NAME="Category" SIZE="4" multiple>
<option selected value="%">All</option>
<option>Auto & Mech: Auto Body/Paint
</option>
<option>Auto & Mech: Dealership
</option>
<option>Auto & Mech: Gas Stations
</option>
<option>Auto & Mech: Motorcycles
</option>
<option>Auto & Mech: Repair</option>
<option>Auto & Mech: Retail</option>
<option>Auto & Mech: Salvage</option>
<option>Auto & Mech: Towing</option>
<option>Auto & Mech: Transmission
</option>
<option>Commercial Real Estate
</option>
<option>Food & Beverage: Bakery
</option>
<option>Food & Beverage: Bars & Clubs
</option>
<option>Food & Beverage: Beer/Wine/Liquor</option>
<option>Food & Beverage: Candy Store
</option>
<option>Food & Beverage: Catering
</option>
<option>Food & Beverage: Coffee Shop & Cafe</option>
<option>Food & Beverage: Convenience & Grocery Stores</option>
<option>Food & Beverage: Ice Cream
</option>
<option>Food & Beverage: Liquor Stores</option>
<option>Food & Beverage: Restaurants/Fast Food</option>
<option>Food & Beverage: Restaurants/Fine Dining</option>
<option>Food & Beverage: Restaurants/Quick Serve</option>
<option>Food & Beverage: Supermarket & Grocery Stores</option>
<option>Food & Beverage: Winery/Vineyard</option>
<option>Home Based or Internet Based
</option>
<option>Manufacturing: Bindery/Publishing</option>
<option>Manufacturing: Concrete
</option>
<option>Manufacturing: Confections
</option>
<option>Manufacturing: Consumer Products</option>
<option>Manufacturing: Machinery
</option>
<option>Manufacturing: Metal Products
</option>
<option>Manufacturing: Sign Company
</option>
<option>Manufacturing: Wood, Stone, Concrete</option>
<option>Recreation: Entertainment
</option>
<option>Recreation: Outdoor</option>
<option>Recreation: Sports & Exercise
</option>
<option>Retail: Antique Store
</option>
<option>Retail: Arts & Crafts
</option>
<option>Retail: Book Store</option>
<option>Retail: Building, Home, & Garden</option>
<option>Retail: Clothing & Accessories
</option>
<option>Retail: Copy & Photo</option>
<option>Retail: Dollar Store</option>
<option>Retail: Electronics &Technology</option>
<option>Retail: Equipment Sales
</option>
<option>Retail: Flooring/Tile/Carpet
</option>
<option>Retail: Florists</option>
<option>Retail: Frame/Art Gallery
</option>
<option>Retail: Furniture Store
</option>
<option>Retail: Gift/Award/Trophy Shops</option>
<option>Retail: Health & Beauty
</option>
<option>Retail: Home Appliance/Accessories</option>
<option>Retail: Jewelry Store</option>
<option>Retail: Lighting/Lamps
</option>
<option>Retail: Medical Supply & Equipment / Pharmacy</option>
<option>Retail: Music Store</option>
<option>Retail: Pawn Shop</option>
<option>Retail: Pet Stores & Services
</option>
<option>Retail: Shoe Store</option>
<option>Retail: Sign Shop</option>
<option>Retail: Stationery</option>
<option>Retail: Video Store</option>
<option>Retail: Wireless Service
</option>
<option>Services: Advertising, Printing</option>
<option>Services: Alarms & Security
</option>
<option>Services: Bail Bondsman
</option>
<option>Services: Beauty, Hair & Spas
</option>
<option>Services: Bed & Breakfast Inn
</option>
<option>Services: Bed & Breakfast Spa & Rental</option>
<option>Services: Business, Office & Shipping</option>
<option>Services: Check Cashing
</option>
<option>Services: Children</option>
<option>Services: Cleaning</option>
<option>Services: Cleanup/Restoration
</option>
<option>Services: Communication/Technology</option>
<option>Services: Construction, Contractors</option>
<option>Services: Copy & Photo
</option>
<option>Services: Delivery</option>
<option>Services: Driving School
</option>
<option>Services: Dry Cleaning & Laundry</option>
<option>Services: Funeral/Cremation
</option>
<option>Services: Glass Install/Repair</option>
<option>Services: Hotel, Motel, Lodging</option>
<option>Services: Inspection</option>
<option>Services: Limousine/Cab
</option>
<option>Services: Mailing/Packing/Shipping</option>
<option>Services: Maintenance, Landscaping</option>
<option>Services: Marina</option>
<option>Services: Medical, Dental, Assisted Living</option>
<option>Services: Mortgage</option>
<option>Services: Moving/Storage/Trucking</option>
<option>Services: Photography Studio
</option>
<option>Services: Pool/Hot Tub
</option>
<option>Services: Printing/Binding/Publishing</option>
<option>Services: Printing/Publishing
</option>
<option>Services: Professional
</option>
<option>Services: Repair</option>
<option>Services: Transportation
</option>
<option>Services: Transportation & Travel</option>
<option>Services: Vending Company
</option>
<option>Technology: Computer Services
</option>
<option>Technology: Internet</option>
<option>Wholesale/Distribution: Durable Goods</option>
<option>Wholesale/Distribution: Import/Export</option>
<option>Wholesale/Distribution: Non-Durable</option>
</select><!--webbot bot="DatabaseRegionEnd" b-tableformat="FALSE" b-menuformat="TRUE" u-dbrgn2="_fpclass/fpdbrgn2.inc" i-groupsize="0" clientside preview=" <span style="color: rgb(0,0,0); background-color: rgb(255,255,0)">Results</span> " startspan --><!--webbot bot="DatabaseRegionEnd" endspan --></nobr></td>
</tr>
<tr>
<td width="54" align="center"><font face="Arial" size="2">State </font></td>
<td width="396"><nobr>
<!--webbot bot="DatabaseRegionStart" s-columnnames="Key,BusinessName,Category,Address,Sta te,City,County, AskingPrice,Revenues,Annualprofits,Franchise,Prequ alifiedforfinancing" s-columntypes="3,202,202,202,202,202,202,202,202,202 ,202,202" s-dataconnection="businessforsale" b-tableformat="FALSE" b-menuformat="TRUE" s-menuchoice="State" s-menuvalue="State" b-tableborder="TRUE" b-tableexpand="TRUE" b-tableheader="TRUE" b-listlabels="TRUE" b-listseparator="TRUE" i-listformat="0" b-makeform="FALSE" s-recordsource="Results" s-displaycolumns="State" s-criteria s-order s-sql="SELECT Distinct State FROM Results" b-procedure="FALSE" clientside suggestedext="asp" s-defaultfields s-norecordsfound="No records returned." i-maxrecords="256" i-groupsize="0" botid="3" u-dblib="_fpclass/fpdblib.inc" u-dbrgn1="_fpclass/fpdbrgn1.inc" u-dbrgn2="_fpclass/fpdbrgn2.inc" preview=" <span style="color: rgb(0,0,0); background-color: rgb(255,255,0)">Database</span> " startspan --><!--#include file="_fpclass/fpdblib.inc"-->
<% if 0 then %>
<SCRIPT Language="JavaScript">
document.write("<div style='background: yellow; color: black;'>The Database Results component on this page is unable to display database content. The page must have a filename ending in '.asp', and the web must be hosted on a server that supports Active Server Pages.</div>");
</SCRIPT>
<% end if %>
<%
fp_sQry="SELECT Distinct State FROM Results"
fp_sDefault=""
fp_sNoRecords="No records returned."
fp_sDataConn="businessforsale"
fp_iMaxRecords=256
fp_iCommandType=1
fp_iPageSize=0
fp_fTableFormat=False
fp_fMenuFormat=True
fp_sMenuChoice="State"
fp_sMenuValue="State"
fp_sColTypes="&Key=3&BusinessName=202&Category=202 &Address=202& State=202&City=202&County=202&AskingPrice=202&Reve nues=202& Annualprofits=202&Franchise=202&Prequalifiedforfin ancing=202&"
fp_iDisplayCols=1
fp_fCustomQuery=False
BOTID=3
fp_iRegion=BOTID
%>
<!--webbot bot="DatabaseRegionStart" endspan i-checksum="36649" --><select NAME="State" SIZE="1">
<option selected value="%">All</option>
<option ?AK>AK</option>
<option ?AL>AL</option>
<option ?AR>AR</option>
<option ?AZ>AZ</option>
<option ?CA>CA</option>
<option ?CO>CO</option>
<option ?DC>DC</option>
<option ?DE>DE</option>
<option ?FL>FL</option>
<option ?GA>GA</option>
<option ?HI>HI</option>
<option ?IA>IA</option>
<option ?ID>ID</option>
<option ?IL>IL</option>
<option ?IN>IN</option>
<option ?KS>KS</option>
<option ?KY>KY</option>
<option ?LA>LA</option>
<option ?MA>MA</option>
<option ?MD>MD</option>
<option ?MI>MI</option>
<option ?MN>MN</option>
<option ?MO>MO</option>
<option ?MS>MS</option>
<option ?MT>MT</option>
<option ?NC>NC</option>
<option ?ND>ND</option>
<option ?NH>NH</option>
<option ?NJ>NJ</option>
<option ?NM>NM</option>
<option ?NO>NO</option>
<option ?NV>NV</option>
<option ?NY>NY</option>
<option ?OH>OH</option>
<option ?OK>OK</option>
<option ?OR>OR</option>
<option ?PA>PA</option>
<option ?RI>RI</option>
<option ?SC>SC</option>
<option ?SD>SD</option>
<option ?TN>TN</option>
<option ?TX>TX</option>
<option ?UT>UT</option>
<option ?VA>VA</option>
<option ?WA>WA</option>
<option ?WI>WI</option>
<option ?WV>WV</option>
<option ?WY>WY</option>
</select>
<!--webbot bot="AspInclude" clientside u-incfile="_fpclass/fpdbrgn1.inc" startspan --><!--#include file="_fpclass/fpdbrgn1.inc"--><!--webbot bot="AspInclude" endspan i-checksum="62210" -->
<option></option>
<!--webbot bot="AspInclude" clientside u-incfile="_fpclass/fpdbrgn2.inc" startspan --><!--#include file="_fpclass/fpdbrgn2.inc"--><!--webbot bot="AspInclude" endspan i-checksum="62218" -->
</select><!--webbot bot="DatabaseRegionEnd" b-tableformat="FALSE" b-menuformat="TRUE" u-dbrgn2="_fpclass/fpdbrgn2.inc" i-groupsize="0" clientside preview=" <span style="color: rgb(0,0,0); background-color: rgb(255,255,0)">Results</span> " startspan --><!--webbot bot="DatabaseRegionEnd" endspan --></nobr></td>
</tr>
<tr>
<td align="center"><font face="Arial" size="2">Asking Price</font></td>
<td width="396"><nobr>
<!--webbot bot="DatabaseRegionStart" s-columnnames="Key,BusinessName,Category,Address,Sta te,City,County, AskingPrice,Revenues,Annualprofits,Franchise,Prequ alifiedforfinancing" s-columntypes="3,202,202,202,202,202,202,202,202,202 ,202,202" s-dataconnection="businessforsale" b-tableformat="FALSE" b-menuformat="TRUE" s-menuchoice="AskingPrice" s-menuvalue="AskingPrice" b-tableborder="TRUE" b-tableexpand="TRUE" b-tableheader="TRUE" b-listlabels="TRUE" b-listseparator="TRUE" i-listformat="0" b-makeform="FALSE" s-recordsource="Results" s-displaycolumns="AskingPrice" s-criteria s-order s-sql="SELECT Distinct AskingPrice FROM Results" b-procedure="FALSE" clientside suggestedext="asp" s-defaultfields s-norecordsfound="No records returned." i-maxrecords="256" i-groupsize="0" botid="6" u-dblib="_fpclass/fpdblib.inc" u-dbrgn1="_fpclass/fpdbrgn1.inc" u-dbrgn2="_fpclass/fpdbrgn2.inc" preview=" <span style="color: rgb(0,0,0); background-color: rgb(255,255,0)">Database</span> " startspan --><!--#include file="_fpclass/fpdblib.inc"-->
<% if 0 then %>
<SCRIPT Language="JavaScript">
document.write("<div style='background: yellow; color: black;'>The Database Results component on this page is unable to display database content. The page must have a filename ending in '.asp', and the web must be hosted on a server that supports Active Server Pages.</div>");
</SCRIPT>
<% end if %>
<%
fp_sQry="SELECT Distinct AskingPrice FROM Results"
fp_sDefault=""
fp_sNoRecords="No records returned."
fp_sDataConn="businessforsale"
fp_iMaxRecords=256
fp_iCommandType=1
fp_iPageSize=0
fp_fTableFormat=False
fp_fMenuFormat=True
fp_sMenuChoice="AskingPrice"
fp_sMenuValue="AskingPrice"
fp_sColTypes="&Key=3&BusinessName=202&Category=202 & Address=202&State=202&City=202&County=202& AskingPrice=202&Revenues=202&Annualprofits=202& Franchise=202&Prequalifiedforfinancing=202&"
fp_iDisplayCols=1
fp_fCustomQuery=False
BOTID=6
fp_iRegion=BOTID
%>
<!--webbot bot="DatabaseRegionStart" endspan i-checksum="58198" --><select NAME="AskingPrice" SIZE="1">
<option selected value="%">All</option>
<option value="Less than $100,000">
Less than $100,000</option>
<option value="$100,000 to $250,000">
$100,000 to $250,000</option>
<option value="$250,000 to $1,000,000">
$250,000 to $1,000,000</option>
<option value="More than $1,000,000">
More than $1,000,000</option>
</select>
<!--webbot bot="AspInclude" clientside u-incfile="_fpclass/fpdbrgn1.inc" startspan --><!--#include file="_fpclass/fpdbrgn1.inc"--><!--webbot bot="AspInclude" endspan i-checksum="62210" -->
<option></option>
<!--webbot bot="AspInclude" clientside u-incfile="_fpclass/fpdbrgn2.inc" startspan --><!--#include file="_fpclass/fpdbrgn2.inc"--><!--webbot bot="AspInclude" endspan i-checksum="62218" -->
</select><!--webbot bot="DatabaseRegionEnd" b-tableformat="FALSE" b-menuformat="TRUE" u-dbrgn2="_fpclass/fpdbrgn2.inc" i-groupsize="0" clientside preview=" <span style="color: rgb(0,0,0); background-color: rgb(255,255,0)">Results</span> " startspan --><!--webbot bot="DatabaseRegionEnd" endspan --></nobr></td>
</tr>
</table>
</div>
<p align="center">
<input TYPE="Submit"></p>
</form>