John,

> the field i want to get is total but if i use

Try the SQL syntax of named fields in the select (as you have already done
in the where clause):

<cfquery name="getRep" datasource="#session.datasource#"
dbserver="#session.dbserver#">
  SELECT d.total
  FROM trip_flow_breakdown b, trip_flow_data d
  WHERE b.wid = #attributes.wid# AND b.fid = #attributes.fid# AND b.id =
#attributes.id#
  AND d.wid = #attributes.wid# AND d.fid = #attributes.fid#
</cfquery>

Then:  <cfoutput query="getRep">#total#</cfoutput>

If you wanted both values you could do:

<cfquery name="getRep" datasource="#session.datasource#"
dbserver="#session.dbserver#">
  SELECT d.total AS dataTotal, b.total AS breakdownTotal
  FROM trip_flow_breakdown b, trip_flow_data d
  WHERE b.wid = #attributes.wid# AND b.fid = #attributes.fid# AND b.id =
#attributes.id#
  AND d.wid = #attributes.wid# AND d.fid = #attributes.fid#
</cfquery>

Then:  <cfoutput query="getRep">#dataTotal# #breakdownTotal#</cfoutput>

cheers

David
______________________________________________________________________
Get the mailserver that powers this list at http://www.coolfusion.com
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