C
Chris
Please could someone take a look at following code .I want it to select
Distinct options but keep on getting multiple of the same selection.
eg:
Isat
Isat
Isat
Kemco
The choices are run from a database selection in a dropdown box.
Please could some one help.
Thanks Chris
Code follows
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
""""""""""""""""""""""""""""""""""""""""""
<html>
<head>
<% ' FP_ASP -- ASP Automatically generated by a FrontPage Component. Do not
Edit.
FP_CharSet = "windows-1252"
FP_CodePage = 1252 %>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Sub Search</title>
</head>
<body bgcolor="#C0C0C0">
<!--webbot bot="DatabaseRegionStart"
s-columnnames="ID,Maincategory,Sublist,Remote_computer_name,User_name,Browse
r_type,Timestamp" s-columntypes="3,202,202,202,202,202,135"
s-dataconnection="Sublisting" b-tableformat="FALSE" b-menuformat="FALSE"
s-menuchoice s-menuvalue b-tableborder="TRUE" b-tableexpand="TRUE"
b-tableheader="TRUE" b-listlabels="FALSE" b-listseparator="FALSE"
i-listformat="2" b-makeform="FALSE" s-recordsource="Results"
s-displaycolumns="Sublist" s-criteria="[Maincategory] EQ {Maincategory} +"
s-order="[Sublist] +" s-sql="SELECT DISTINCT * FROM Results WHERE
(Maincategory = '::Maincategory::') ORDER BY Sublist ASC"
b-procedure="FALSE" clientside suggestedext="asp"
s-defaultfields="Maincategory=" s-norecordsfound="No records returned."
i-maxrecords="256" i-groupsize="0" botid="0"
u-dblib="../../_fpclass/fpdblib.inc" u-dbrgn1="../../_fpclass/fpdbrgn1.inc"
u-dbrgn2="../../_fpclass/fpdbrgn2.inc" tag="BODY" preview="<table
border=0 width="100%"><tr><td
bgcolor="#FFFF00"><font color="#000000">This is
the start of a Database Results region. The page must be fetched from a web
server with a web browser to display correctly; the current web is stored on
your local disk or
network.</font></td></tr></table>"
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 * FROM Results WHERE (Maincategory =
'::Maincategory::') ORDER BY Sublist ASC"
fp_sDefault="Maincategory="
fp_sNoRecords="No records returned."
fp_sDataConn="Sublisting"
fp_iMaxRecords=256
fp_iCommandType=1
fp_iPageSize=0
fp_fTableFormat=False
fp_fMenuFormat=False
fp_sMenuChoice=""
fp_sMenuValue=""
fp_sColTypes="&ID=3&Maincategory=202&Sublist=202&Remote_computer_name=202&Us
er_name=202&Browser_type=202&Timestamp=135&"
fp_iDisplayCols=1
fp_fCustomQuery=False
BOTID=0
fp_iRegion=BOTID
%>
<!--#include file="../../_fpclass/fpdbrgn1.inc"-->
<!--webbot bot="DatabaseRegionStart" endspan i-checksum="60817" --><ul>
<li>
<a target="_self"
href="Areaselect.asp?Sublist=<%=FP_FieldURL(fp_rs,"Sublist")%>">
<!--webbot bot="DatabaseResultColumn"
s-columnnames="ID,Maincategory,Sublist,Remote_computer_name,User_name,Browse
r_type,Timestamp" s-column="Sublist" b-tableformat="FALSE" b-hashtml="FALSE"
b-makelink="FALSE" clientside b-MenuFormat preview="<font
size="-1">&lt;&lt;</font>Sublist<font
size="-1">&gt;&gt;</font>"
startspan --><%=FP_FieldVal(fp_rs,"Sublist")%><!--webbot
bot="DatabaseResultColumn" endspan i-checksum="15449" --></a></li>
</ul>
<!--webbot bot="DatabaseRegionEnd" b-tableformat="FALSE"
b-menuformat="FALSE" u-dbrgn2="../../_fpclass/fpdbrgn2.inc" i-groupsize="0"
clientside tag="BODY" preview="<table border=0
width="100%"><tr><td
bgcolor="#FFFF00"><font color="#000000">This is
the end of a Database Results
region.</font></td></tr></table>"
startspan --><!--#include file="../../_fpclass/fpdbrgn2.inc"-->
<!--webbot bot="DatabaseRegionEnd" endspan i-checksum="65064" -->
</body>
</html>
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
""""""""""""""""""""""""""""""""""
Distinct options but keep on getting multiple of the same selection.
eg:
Isat
Isat
Isat
Kemco
The choices are run from a database selection in a dropdown box.
Please could some one help.
Thanks Chris
Code follows
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
""""""""""""""""""""""""""""""""""""""""""
<html>
<head>
<% ' FP_ASP -- ASP Automatically generated by a FrontPage Component. Do not
Edit.
FP_CharSet = "windows-1252"
FP_CodePage = 1252 %>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Sub Search</title>
</head>
<body bgcolor="#C0C0C0">
<!--webbot bot="DatabaseRegionStart"
s-columnnames="ID,Maincategory,Sublist,Remote_computer_name,User_name,Browse
r_type,Timestamp" s-columntypes="3,202,202,202,202,202,135"
s-dataconnection="Sublisting" b-tableformat="FALSE" b-menuformat="FALSE"
s-menuchoice s-menuvalue b-tableborder="TRUE" b-tableexpand="TRUE"
b-tableheader="TRUE" b-listlabels="FALSE" b-listseparator="FALSE"
i-listformat="2" b-makeform="FALSE" s-recordsource="Results"
s-displaycolumns="Sublist" s-criteria="[Maincategory] EQ {Maincategory} +"
s-order="[Sublist] +" s-sql="SELECT DISTINCT * FROM Results WHERE
(Maincategory = '::Maincategory::') ORDER BY Sublist ASC"
b-procedure="FALSE" clientside suggestedext="asp"
s-defaultfields="Maincategory=" s-norecordsfound="No records returned."
i-maxrecords="256" i-groupsize="0" botid="0"
u-dblib="../../_fpclass/fpdblib.inc" u-dbrgn1="../../_fpclass/fpdbrgn1.inc"
u-dbrgn2="../../_fpclass/fpdbrgn2.inc" tag="BODY" preview="<table
border=0 width="100%"><tr><td
bgcolor="#FFFF00"><font color="#000000">This is
the start of a Database Results region. The page must be fetched from a web
server with a web browser to display correctly; the current web is stored on
your local disk or
network.</font></td></tr></table>"
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 * FROM Results WHERE (Maincategory =
'::Maincategory::') ORDER BY Sublist ASC"
fp_sDefault="Maincategory="
fp_sNoRecords="No records returned."
fp_sDataConn="Sublisting"
fp_iMaxRecords=256
fp_iCommandType=1
fp_iPageSize=0
fp_fTableFormat=False
fp_fMenuFormat=False
fp_sMenuChoice=""
fp_sMenuValue=""
fp_sColTypes="&ID=3&Maincategory=202&Sublist=202&Remote_computer_name=202&Us
er_name=202&Browser_type=202&Timestamp=135&"
fp_iDisplayCols=1
fp_fCustomQuery=False
BOTID=0
fp_iRegion=BOTID
%>
<!--#include file="../../_fpclass/fpdbrgn1.inc"-->
<!--webbot bot="DatabaseRegionStart" endspan i-checksum="60817" --><ul>
<li>
<a target="_self"
href="Areaselect.asp?Sublist=<%=FP_FieldURL(fp_rs,"Sublist")%>">
<!--webbot bot="DatabaseResultColumn"
s-columnnames="ID,Maincategory,Sublist,Remote_computer_name,User_name,Browse
r_type,Timestamp" s-column="Sublist" b-tableformat="FALSE" b-hashtml="FALSE"
b-makelink="FALSE" clientside b-MenuFormat preview="<font
size="-1">&lt;&lt;</font>Sublist<font
size="-1">&gt;&gt;</font>"
startspan --><%=FP_FieldVal(fp_rs,"Sublist")%><!--webbot
bot="DatabaseResultColumn" endspan i-checksum="15449" --></a></li>
</ul>
<!--webbot bot="DatabaseRegionEnd" b-tableformat="FALSE"
b-menuformat="FALSE" u-dbrgn2="../../_fpclass/fpdbrgn2.inc" i-groupsize="0"
clientside tag="BODY" preview="<table border=0
width="100%"><tr><td
bgcolor="#FFFF00"><font color="#000000">This is
the end of a Database Results
region.</font></td></tr></table>"
startspan --><!--#include file="../../_fpclass/fpdbrgn2.inc"-->
<!--webbot bot="DatabaseRegionEnd" endspan i-checksum="65064" -->
</body>
</html>
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
""""""""""""""""""""""""""""""""""