|
|
Wow, that didn't work at all :-)
I got all the employees listed under all the departments.
<cfquery name="deptDirectory" datasource="sql_abt">
Select s.firstname, s.lastname, s.ext, s.title, s.email, d.dept
FROM lsstaff S, lsdepts D
Where s.deptid = d.deptid
AND s.rank <> 2 OR s.rank <> 5
ORDER BY d.dept
</cfquery>
And then used the suggested CFML to output it....
<cfset deptDirectory = viewState.getValue("deptDirectory")>
<cfoutput query="deptDirectory" group="dept">
<b>#dept#</b><br>
<cfoutput>
<table width="98%" border="0" align="center">
<tr>
<td>#firstname# #lastname#</td>
<td>#title#</td>
<td>
<cfif LEN(#ext#) GT 4>
#ext#
<cfelse>
734.827.#ext#
</cfif></td>
</tr>
</table>
<br></cfoutput>
<br>
</cfoutput>
What did I miss?
|
|