Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

do qrys return list or arrays?

Posted on 2002-04-18
3
Medium Priority
?
153 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 20 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

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

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

This is a guide to setting up a new WHM/cPanel Server to be used for web hosting accounts. It is intended for web hosting company administrators and dedicated server owners. For under $99 per month (considering normal rate of Big Data Cetnters like …
Introduction This article explores the design of a cache system that can improve the performance of a web site or web application.  The assumption is that the web site has many more “read” operations than “write” operations (this is commonly the ca…
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
Suggested Courses

772 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