Grouping not quite there . . .
greetings,
first off, have searched , reviewed previous posts answer have not found seemed address issue experiencing.
db: mysql
cf: 8
below query/code displays 1 firefightername. there anywhere 4 6 firefighters per station, per date. desire display firefightername horizontally under each station.
what missing here?
thanks in advance assistance
leonard b
<=== query ===>
<cfquery name="rsshiftinfo" datasource="*****">
select
recordid
, shiftdate
, shiftquarter
, shiftmonth
, firefightername
, station
, positionone
, positiontwo
, shiftcomment
firefightershiftassignments
where
shiftmonth = <cfqueryparam value="7" cfsqltype="cf_sql_integer">
group by
shiftdate, station
</cfquery>
<=== code ===>
<cfoutput query="rsshiftinfo" group="shiftdate">
<div style="clear: both; height: 250px;">
<span>#dateformat(shiftdate,"mm/dd/yyyy - dddd")#</span><br />
<cfoutput group="station">
<div style="padding-top: 15px;">
station: #station#<br />
#firefightername#
</div>
</cfoutput>
</div>
</cfoutput>
<=== current output ===>
07/02/2012 - monday
firefightername
station: 96
firefightername
station: 97
firefightername
station: 99
firefightername
<=== desired output ===>
07/02/2012 - monday
station: 90
firefightername - firefightername - firefightername - firefightername - etc
station: 96
firefightername- firefightername - firefightername - firefightername - etc
station: 97
firefightername - firefightername - firefightername - firefightername - etc
station: 99
firefightername - firefightername - firefightername - firefightername - etc
first thing @ query. returning expect (more 1 firefighter given station)?
just use <cfdump var="#rsshiftinfo#"> see query returning.
More discussions in ColdFusion
adobe
Comments
Post a Comment