• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 154
  • Last Modified:

do qrys return list or arrays?

need to find max val for a colmn in db-  does qry return list or array?
<cfquery name="getIdOrigin" datasource="training">
select id_origin
from course_history_ext</cfquery>
<cfset newid = "ArrayMax(getidorigin.id_origin)">
0
owlsey
Asked:
owlsey
  • 2
1 Solution
 
owlseyAuthor Commented:
used this brute of an expression to do it- looks pretty sloppy to me...


<cfset newid = "#ArrayMax(ListToArray(ValueList(getIdOrigin.id_origin),','))#">
0
 
YogCommented:
<cfquery name="getIdOrigin" datasource="training">
select id_origin, max(id_origin) as maxvalue
from course_history_ext</cfquery>

<cfoutput>
#training.maxvalue#
</cfoutput>
0
 
owlseyAuthor Commented:
works for me- didnt know about that sql function-

and i gather cf returns lists for qry's?

ja?
0

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now