I'm running a multi-table query to retrieve images and image info, and a query
of queries to retrieve distincts.
This first query is in my cfc. I just tested the q of q in the template to make
sure it works right and it does. Now I'm trying to figure out where exactly to
put it in my cfc and how to use it. lol!!
Here's my template code as it stands right now:
<cfinvoke component="#APPLICATION.productmanager#" method="listSKUImages"
SKUID="#SKUID#" returnvariable="listSKUImages">
</cfinvoke>
<cfquery dbtype="query" name="listDistinctImages">
SELECT DISTINCT imagetypeID, optionID, optionimagefilename
FROM listskuimages
</cfquery>
<cfdump var="#listDistinctImages#">
Here's what's in my cfc for listSkuImages():
<cffunction name="listSKUImages" returntype="query" hint="Gets SKU images">
<cfargument name="SKUID" required="yes" type="numeric">
<cfset var listskuimages ="">
<cfquery name="listskuimages" datasource="#VARIABLES.dsn#">
SELECT tbloptionimages.optionimageID, tbloptionimages.SKUID,
tbloptionimages.optionID, tbloptionimages.imagetypeID,
tbloptionimages.optionimagefilename, tblSKUoptions.optionID
FROM tbloptionimages, tblSKUoptions
WHERE tbloptionimages.SKUID = #ARGUMENTS.SKUID#
AND tbloptionimages.optionID = tblSKUoptions.optionID
</cfquery>
<cfreturn listskuimages>
</cffunction>
Now, how do I run the q of q on listSkuImages() and return it at the same time?
Thanks!
Will
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking
application. Start tracking and documenting hours spent on a project or with a
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:222262
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54