> Hello,
> I just wanted to make sure I was not doing something wrong here. When
> I run the following code all of it work except for the "Order By total
> Desc". The order by never happens.
>
> Is this a know issue?
Curious. I emulated what you are trying here with stand-alone code
(below), and it runs fine:
<cfset q1 = queryNew("")>
<cfset queryAddColumn(q1, "id", listToArray("1,2,3,4,5,6"))>
<cfset queryAddColumn(q1, "logins",
listToArray("user1,user2,user3,user2,user3,user3"))>
<cfquery name="q2" dbtype="query">
SELECT logins, count(*) AS total
FROM q1
GROUP BY logins
ORDER BY total DESC
</cfquery>
<cfdump var="#q2#">
Note, one should also be about to use this syntax:
ORDER BY 2 DESC
(where 2 is the position of the column in the SELECT statement), but
this doesn't work for me on OBD. Or BD.NET, for that matter. It
works as expected on CF or Railo.
:-(
--
Adam
--
Open BlueDragon Public Mailing List
http://www.openbluedragon.org/ http://twitter.com/OpenBlueDragon
official manual: http://www.openbluedragon.org/manual/
Ready2Run CFML http://www.openbluedragon.org/openbdjam/
mailing list - http://groups.google.com/group/openbd?hl=en