Depends on if Price or Size is a varchar/char field then it may be ordering Correctly as it is not an INTEGER field where the sequence would be 1,2,3
-----Original Message----- From: Rick King [mailto:[EMAIL PROTECTED] Sent: Monday, October 23, 2006 2:19 PM To: CF-Talk Subject: Problem with ORDER BY clause No matter what I do, I can't seem to get the following query to ORDER by either Size or Price. It will only order by Designer. If I place either Price or Size in the order clause, the order clause is ignored. If I place Designer in the order clasue, it orders correctly. Any ideas? Thanks Rick <cfquery name="getproducts" datasource="wioDB" cachedwithin="#CreateTimeSpan(0,0,10,0)#"> SELECT P.ProdID, P.Designer, P.Size, P.Price, I.Image, I.IsPrimary, C.Category FROM Products P, Images I, Category C WHERE P.ProdID = I.ProdID AND P.CatID = C.CatID AND IsPrimary = 'Yes' AND Status = 'Approved' <cfif URL.Category EQ 'Dresses'> <cfset type = 'Dresses'> AND C.CatID = 1 </cfif> <cfif URL.Category EQ 'Pants'> <cfset type = 'Pants'> AND C.CatID = 2 </cfif> <cfif URL.Category EQ 'Special Occasion Dresses'> <cfset type = 'Special Occasion Dresses'> AND C.CatID = 3 </cfif> ORDER BY Price </cfquery> <cfloop query="getproducts" startrow="#URL.StartRow#" endrow="#endrow#"> <cfoutput> <td align="center" valign="top"> <p> <a href="details.cfm?ProdID=#getproducts.ProdID#"><img src="users/uploads/#getproducts.Image#" width="100" style="border:1px solid ##E0E0E0; padding:8px;"> </a><br /> <span class="titles">Dress Size:</span> #getProducts.Size#<br> <span class="titles">Price:</span> #DollarFormat(getProducts.Price)#<br> <span class="titles">Designer:</span> #getProducts.Designer#<br> </td> <cfif getproducts.currentrow mod 3 EQ 0> </tr> </cfif> </cfoutput> </cfloop> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:257777 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

