- Order your query by employee ID.

- cfoutput the query and cfabort to verify you are in fact getting an
ordered recordset.

- cfoutput the query grouping by employee ID

In your example, your ORDER BY in the query is not by employee ID. You have
to order by employee ID to get your desired output, otherwise it won't work
at all.

Adam.




> -----Original Message-----
> From: Paul Ihrig [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, March 07, 2002 11:23 AM
> To: CF-Talk
> Subject: RE: Group in cfoutput query. brain fart
> 
> 
> thanks Chuck & all
> but it is still not working the way i envision it.
> any more advice on this would be great!
> i know i know it, just cant get it!
> i have tried nesting different 
> 
> the Current Results:
> 
> Adkins , John  1111(241)  Edit Photo  
> Adkins , John  222-223-1111  Edit Photo  
> Anderson , Dorman  1111  Edit Photo  
> Anderson , Dorman  222-223-1111  Edit Photo  
> Appleford , Chris  222-223-1111  Edit Photo  
> Ayars , Daniel  222-621-1111  
> 
> What i want the Results to be:
> 
> Adkins , John  1111(241)  Edit Photo  
>                       222-223-1111 
> Anderson , Dorman  1111  Edit Photo  
>                                222-223-1111
> Appleford , Chris  222-223-1111  Edit Photo  
> Ayars , Daniel  222-621-1111  
> 
> Thank You All
> -paul
> 
> 
> <cfquery name="Employees" datasource="RPH">
> SELECT 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 #FORM.OrderBy#, tblOffice.City, tblEmployee.EMPLOYEE_ID;
> </cfquery>
> 
> Name
> Extension
> Edit
> 
> <CFOUTPUT QUERY="Employees" GROUP="StudioName">    
> Office - Studio
> #Employees.City# - #Employees.StudioName#
> <cfoutput>          
> #Employees.LastName#, #Employees.FirstName# #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>
> 
> 
> 
______________________________________________________________________
Get Your Own Dedicated Windows 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=coldfusionb
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

Reply via email to