Solved

do qrys return list or arrays?

Posted on 2002-04-18
3
142 Views
Last Modified: 2013-12-24
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
Comment
Question by:owlsey
  • 2
3 Comments
 

Author Comment

by:owlsey
ID: 6951188
used this brute of an expression to do it- looks pretty sloppy to me...


<cfset newid = "#ArrayMax(ListToArray(ValueList(getIdOrigin.id_origin),','))#">
0
 
LVL 5

Accepted Solution

by:
Yog earned 5 total points
ID: 6951638
<cfquery name="getIdOrigin" datasource="training">
select id_origin, max(id_origin) as maxvalue
from course_history_ext</cfquery>

<cfoutput>
#training.maxvalue#
</cfoutput>
0
 

Author Comment

by:owlsey
ID: 6951878
works for me- didnt know about that sql function-

and i gather cf returns lists for qry's?

ja?
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A web service (http://en.wikipedia.org/wiki/Web_service) is a software related technology that facilitates machine-to-machine interaction over a network. This article helps beginners in creating and consuming a web service using the ColdFusion Ma…
When it comes to showing a 404 error page to your visitors, you do not want that generic page to show, and you especially do not want your hosting provider’s ad error page to show either. In this article, I will show you how to enable the custom 40…
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

815 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now