ok this combo hides the first returned duplicate, but not all the duplicate
EmployeeName/EmployeeID
if you could give me a hint as to what i need to do.
i must have forgotten every thing.
thanks
-paul
<!--- Get the id of golfer EmployeeName for limiting drop down --->
<cfquery name="Get_Golf" datasource=#MM_golf_DSN#
username=#MM_golf_USERNAME# password=#MM_golf_PASSWORD#>
SELECT DISTINCT EmployeeName
FROM tbl_Golf
GROUP BY EmployeeName
</cfquery>
<CFQUERY NAME="rs_Employees"
DATASOURCE="#MM_golf_DSN#"
DBTYPE="ODBC"
USERNAME="#MM_golf_USERNAME#"
PASSWORD="#MM_golf_PASSWORD#">
SELECT FirstName, LastName, Email, EmployeeID
FROM tbl_Employee
WHERE #Get_Golf.EmployeeName# <> EmployeeID
ORDER BY LastName
DESC;</CFQUERY>
The select statement
<INPUT type="hidden" name="Player4_integer">
<select name="Player4">
<cfloop query="rs_Employees">
<option value="<cfoutput>#rs_Employees.EmployeeID#</cfoutput>" <cfif
(#rs_Employees.EmployeeID# EQ
#rs_Employees.EmployeeID#)>SELECTED</cfif>><cfoutput>#rs_Employees.LastName#
#rs_Employees.FirstName#</cfoutput></option>
</cfloop>
</select>
thank you
-paul
"Whatever you can do, or dream you can, begin it.
Boldness has genius, power, and magic in it." - Goethe
web developer, nbbj
work: [EMAIL PROTECTED]
614 241-3534
fax: 614 485-5534
home: [EMAIL PROTECTED]
614 449-1681
> icq: 47658358
-----Original Message-----
From: Paul Ihrig [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 31, 2001 10:52 AM
To: CF-Talk
Subject: RE: Select Boxes <> limiting drop down :: Please Look
ok.
still no luck.
i have tried DISTINCT
have tried putting the 2 queries together
i should be able to just have in my sql
WHERE EmployeeName <> EmployeeID
but it doesn't work!!!!!!!!
like below:
<CFQUERY NAME="rs_Employees"
DATASOURCE="golf">
SELECT DISTINCT EmployeeID, FirstName, LastName, Email, EmployeeName
FROM tbl_Employee, GOLF
WHERE EmployeeName <> EmployeeID
ORDER BY LastName
DESC;</CFQUERY>
<!--- The Select Box in Question --->
<select name="Player2">
<cfloop query="rs_Employees">
<option value="<cfoutput>#rs_Employees.EmployeeID#</cfoutput>" <cfif
(#rs_Employees.EmployeeID# EQ
#rs_Employees.EmployeeID#)>SELECTED</cfif>><cfoutput>#rs_Employees.LastName#
#rs_Employees.FirstName#</cfoutput></option>
</cfloop>
</select>
But then i get all sorts of duplicates.
-paul
"Whatever you can do, or dream you can, begin it.
Boldness has genius, power, and magic in it." - Goethe
web developer, nbbj
work: [EMAIL PROTECTED]
614 241-3534
fax: 614 485-5534
home: [EMAIL PROTECTED]
614 449-1681
> icq: 47658358
-----Original Message-----
From: Paul Ihrig [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 31, 2001 9:13 AM
To: CF-Talk
Subject: Select Boxes <> limiting drop down :: Brian Lock
Ok i know this is simple but i have forgot something
i want to limit the returned names on a select box to
only those who have not signed up!
<!---
Get the id of golfer EmployeeName
[which is an ID] for limiting the drop down
--->
<cfquery name="Get_Golf" datasource="golf">
SELECT GolfID, EmployeeName
FROM tbl_Golf
</cfquery>
<!---
Find Employee Name for drop down ::
But Hiding employees who have already signed up,
with the where statement
--->
<cfquery name="rs_Employees" datasource="golf">
SELECT EmployeeID, FirstName, LastName, Email
FROM tbl_Employee
WHERE #Get_Golf.EmployeeName# <> .EmployeeID
ORDER BY LastName
DESC;
</cfquery>
<!--- The Select Box in Question --->
<select name="Player2">
<cfloop query="rs_Employees">
<option value="<cfoutput>#rs_Employees.EmployeeID#</cfoutput>" <cfif
(#rs_Employees.EmployeeID# EQ
#rs_Employees.EmployeeID#)>SELECTED</cfif>><cfoutput>#rs_Employees.LastName#
#rs_Employees.FirstName#</cfoutput></option>
</cfloop>
</select>
Thank You!
-paul
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists