I'm not sure about the message "repvol is undefined", however, simply having a cleaner
query structure might help significantly in figuring out what's wrong if not solving
your issue... give this a shot:
<cfquery name="currentQuery" datasource="commodityHistory">
SELECT * FROM price WHERE ID = (SELECT MAX(ID) FROM price)
</cfquery>
<cfdump var="#currentQuery#">
<cfoutput query="currentQuery">
blah blah...
</cfoutput>
hth
s. isaac dealey 972-490-6624
new epoch http://www.turnkey.to
lead architect, tapestry cms http://products.turnkey.to
tapestry api is opensource http://www.turnkey.to/tapi
certified advanced coldfusion 5 developer
http://www.macromedia.com/v1/handlers/index.cfm?ID=21816
> Below is an exerpt of my code that is applicable. Whats
> weird is that
> the first cfoutput gives me an error, "repvol is
> undefined", and the
> second cfoutput works (of course I have to rid the first
> one to see so
> that it will process the second). Both are working valid
> fields in my
> db. I don't understand why it wont work for cfvol. It also
> wont work
> when I tried it on repIssue. Though there is data in
> those fields on
> the most recent record. Ive been sitting here for hours
> trying to make
> this work. Im a little new at this, so excuse me. Any
> help is much much
> appreciated! Thanks!
> ----------------------------------------------------------
> --------------
> ----------------------------------------------------------
> --------------
> ------------------------------------
> <cfquery
> name="maxidQuery" datasource="commodityHistory">
> SELECT MAX(ID) as currentRecord
> FROM price
> </cfquery>
> <cfoutput
> query="maxidQuery">
> <cfquery
> name="currentQuery" datasource="commodityHistory">
> SELECT *
> FROM price
> WHERE ID = #currentRecord#
> </cfquery>
> </cfoutput>
> <table width="562" border="0" cellpadding="0"
> cellspacing="0">
> <tr>
> <td width="562">
> <table border="0" cellpadding="3" cellspacing="0"
> width="562"
> align="center">
> <tr>
> <td class="tbl" colspan="3" align="center"><font
> class="pageheader">THE
> WEEKLY COMMODITY REPORT</font><br><font
> class="contentsmall">American
> Restaurant Association Inc. Providing Food-Commodity
> Market Information
> to over 200,000 Food Service Professionals Nationwide. <a
> href="http://www.AmericanRestaurantAssociation.com"
> target="_blank"></a>www.AmericanRestaurantAssociation.com<
> /a></font></td
>>
> </tr>
> <tr>
> <td align="center" class="contentsmall"><b><cfoutput
> query="currentQuery">#currentQuery.repVol#</cfoutput></b><
> /td>
> <td align="center"
> class="contentsmall"><b>#currentQuery.repIssue#</b></td>
> <td align="center" class="contentsmall"><b><cfoutput
> query="currentQuery">#DateFormat(reportDate,"mmmm d,
> yyyy")#</cfoutput></b></td>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> ~~~~~~~~~~~|
> Archives:
> http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
> Subscription: http://www.houseoffusion.com/cf_lists/index.
> cfm?method=subscribe&forumid=4
> FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
> Your ad could be here. Monies from ads go to support these
> lists and provide more resources for the community.
> http://www.fusionauthority.com/ads.cfm
> Unsubscribe: http://www.houseoffusion.com/cf_lists/uns
> ubscribe.cfm?user=633.558.4
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription:
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Your ad could be here. Monies from ads go to support these lists and provide more
resources for the community.
http://www.fusionauthority.com/ads.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4