I'm not quite sure exaclt what you want but if you want to display the
name only once, then all of the phone numbers that are associated with
it, then you need multiple grouping values:
<CFOUTPUT QUERY="Employees" GROUP="city">
Office - Studio
#Employees.City# - #Employees.StudioName#
<cfoutput group="fullname">
#Employees.LastName#, #Employees.FirstName#
<cfoutput>
#Employees.PhoneNumb# Edit Photo
...
</cfoutput>
</cfoutput>
</cfoutput>
I think one of your problems is tha fact that firstname and lastname are
separate values. Try combining them into a single field for sorting
purposes:
tblEmployee.Lastname & ' ' & tblEmployee.Firstname as Fullname,
This works in access, I'm not quite sure about your db.
You need to also sort the records appropriately. This step is not
required, but if you don't do it, then your output will not format
properly.
ORDER BY tblOffice.City, Fullname, tblEmployee.EMPLOYEE_ID;
I hope some of this helps.
- Matt Small
<cfquery name="Employees" datasource="RPH">
SELECT
tblEmployee.Lastname & ' ' & tblEmployee.Firstname as
Fullname, tblEmployee.FirstName, tblEmployee.EMPLOYEE_ID,
tblEmployee.LastName, tblEmployee.EmployeeID, tblEmployee.StudioID,
tblEmployee.Status,
tblStudio.StudioID, tblStudio.OfficeID,
tblStudio.StudioName,
tblOffice.OfficeID, tblOffice.City,
tblPhone.PhoneNumb,
tblFloor.floor
FROM tblEmployee, tblStudio, tblOffice, tblPhone, tblFloor
WHERE
tblEmployee.studioid = tblStudio.studioid AND
tblOffice.OfficeID = '#FORM.OfficeID#' AND
tblPhone.EmpResID = tblEmployee.EMPLOYEE_ID AND
tblEmployee.studioid in (#FORM.StudioID#) AND
tblEmployee.floorid = tblFloor.floorid
ORDER BY tblOffice.City, Fullname, tblEmployee.EMPLOYEE_ID;
</cfquery>
Name
Extension
Edit
<CFOUTPUT QUERY="Employees" GROUP="city">
Office - Studio
#Employees.City# - #Employees.StudioName#
<cfoutput group="fullname">
#Employees.LastName#, #Employees.FirstName#
<cfoutput>
#Employees.PhoneNumb# Edit Photo
<form action="Emp_Delete.cfm" method="post"
name="D_Emp"> <INPUT TYPE="checkbox" NAME="Status" VALUE="Yes"
<cfif (# LSNumberFormat(Employees.Status) # EQ
1)>CHECKED</cfif>> <input type="hidden" name="EmployeeID"
value="#Employees.EmployeeID#"> <cfif #Employees.Status# EQ 0> <input
type="submit" value="check to hide user"> <cfelse><input type="submit"
value="un-check to show user"> </cfif></form>
</cfoutput>
</cfoutput>
</cfoutput>
______________________________________________________________________
Why Share?
Dedicated Win 2000 Server � PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
Instant Activation � $99/Month � Free Setup
http://www.pennyhost.com/redirect.cfm?adcode=coldfusionc
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists