Solved

do qrys return list or arrays?

Posted on 2002-04-18
3
138 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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

One of the typical problems I have experienced is when you have to move a web server from one hosting site to another. You normally prepare all on the new host, transfer the site, change DNS and cross your fingers hoping all will be ok on new server…
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…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

708 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

12 Experts available now in Live!

Get 1:1 Help Now