Here's my final solution for the query - a self-join. 

<cfquery name="getimages" datasource="****">
SELECT TBIG.prodimagefilename AS FullSizeImageFilename, 
TLITTLE.prodimagefilename AS
ThumbnailImageFilename
FROM tblimages_rel TBIG, tblimages_rel TLITTLE
WHERE TBIG.prodID = #URL.prodID# <!--- Matches only rows of product ID you want 
in the full-size version of table --->
AND TBIG.prodID = TLITTLE.prodID <!--- Joins the two versions of the table --->
AND TBIG.ImageTypeID = 2 <!--- tells it to limit this table to full-size images 
--->
AND TLITTLE.ImageTypeID = 1 <!--- tells it to limit this table to thumbnail 
images --->
</cfquery>

Thanks for the tips. And thanks matthieu for this sql. 

Will 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Find out how CFTicket can increase your company's customer support 
efficiency by 100%
http://www.houseoffusion.com/banners/view.cfm?bannerid=49

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:223165
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=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to