>After some work and some more work I have the administration side of the
>cold fusion application working correctly but now when I am adding a
>product I have come across a problem that appears to be with how the query
>in access worked vs sql. The following is the query if anyone has any
>ideas for making this compatible with sql I would greatly apprteciate any help.
<td><a
href="<cfoutput>#Request.RelRootPath#search/index.cfm?topFive=Yes</cfoutput>"
alt="Huge Discounts" title="View our 5 biggest discounted
items"><cfoutput><img
src="#Request.RelRootPath#zimages/rm_topFiveDiscounts.gif"
alt="Remarketing, Save your Money" title="Check out our five biggest
discounted items"></cfoutput></a></td>
</tr>
<cfquery name="getItemDetail" datasource="#DS#"
cachedwithin="#CreateTimeSpan(1,1,1,1)#">
SELECT TOP 5 itemID,itemName, itemLeaseNumber,
itemKeywords, itemThumbnail, itemDescription, itemListPrice,
itemInvoicePrice, MAX(itemListPrice/itemInvoicePrice)
AS priceDifferencePercentage
FROM tblItem, tblkItemStatus
WHERE tblItem.itemStatusID =
tblkItemStatus.itemStatusID
AND tblkItemStatus.itemStatusMainID = 2
AND itemListPrice <> 0
AND itemInvoicePrice <> 0
GROUP BY itemID,itemName, itemLeaseNumber,
itemThumbnail, itemKeywords, itemDescription, itemListPrice, itemInvoicePrice
ORDER BY MAX(itemListPrice/itemInvoicePrice)
ASC
</cfquery>
<tr>
<td class="rightMenu" style="padding-top: 4px;
text-align: left; font: bold 9px; padding-left: 2px;">
<table style="padding: 1px 0px 1px 0px;">
<cfset iCount = 1>
<cfoutput query="getItemDetail">
<cfset pricePercent = 100 -
Round(priceDifferencePercentage * 100)>
<tr>
<td><span style="padding: 0px 2px
0px 2px; color: ##006699; border: 2px ##006699 solid; border-left: 1px
##006699 solid; background-color:white; ">#iCount#</span></td>
<td><span style="color:##FF6600;
font-weight:bold;">SAVE #pricePercent#% ON</span><br><a
href="#Request.RelRootPath#search/itemDetail.cfm?itemID=#itemID#"
title="View Details of #itemName#" class="rightMenu" style=" color:
##006699; "><strong>#UCase('#itemName#')#</strong></a><br>
<span
style="font-size:2px;"><br><br></span></span></td>
<cfset iCount = iCount + 1>
</tr>
</cfoutput>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net
http://www.cfhosting.net
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:187143
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