Not sure if you can do that, but you might want to try getting the file
extension as a calculated column in the query
SELECT
(
RIGHT( filename, 3 )
) AS ext
Then, in the CFOutput, you could group=ext
..
Ben Nadel
Certified Advanced ColdFusion MX7 Developer
cfquery name=foo datasource=bar
SELECT
filename,
right(filename, 3) AS ext,
othercol
FROM
table
ORDER BY
right(filename, 3)
/cfquery
cfoutput query=foo group=ext
that, of course, assumes you only have file extensions of 3
No, but you could select a column in your query that reads just the first 3
characters of the filename, give it a column alias, order by that column
alias, and then use that in your cfoutput group attribute. Something like
this (check your particular RDBMS for the Right() function or similar):
not grouping the gifs properly?
Any ideas what I'm missing?
Thanks guys,
Rob
-Original Message-
From: Brian Kotek [mailto:[EMAIL PROTECTED]
Sent: 23 July 2007 16:24
To: CF-Talk
Subject: Re: GROUP BY RIGHT()?
No, but you could select a column in your query that reads just the first 3
An ORDER BY?
Adrian
-Original Message-
From: Robert Rawlins - Think Blue
[mailto:[EMAIL PROTECTED]
Sent: 23 July 2007 16:45
To: CF-Talk
Subject: RE: GROUP BY RIGHT()?
Thanks guys for the suggestion,
I'll agree that the calculated column is probably my best bet, you're right
Charlie
[mailto:[EMAIL PROTECTED]
Sent: 23 July 2007 16:24
To: CF-Talk
Subject: Re: GROUP BY RIGHT()?
No, but you could select a column in your query that reads just the first 3
characters of the filename, give it a column alias, order by that column
alias, and then use that in your cfoutput group
6 matches
Mail list logo