Ask a Question related to Coldfusion - Advanced Techniques, Design and Development.
-
oak3 #1
how do you sort a collection search
I was wondering if there was a way to sort a collection search by the custom1
field which is an ID number? Do I have to do that programmatically or is there
a handy attribute that could be used? It would be much easier to sort it when
the search is done and then loop through the results with a cfoutput, rather
than sort the results into a new list and then loop through that, but I guess
it's not too big a deal. Just wondered if there was a shortcut. Thanks, Oak
oak3 Guest
-
Databinding to collection classes, how do I sort and set data keys?
Hi all, I have a two classes Course.cs and Courses.cs. Courses is a collection class of Course objects stored in an ArrayList. My Course object has... -
Search PDF collection / indexing puzzle
Hello all - thanks upfront for so much great information. I've come across a strange problem in both Acrobat 5.0.5 and 6.0.1 for Windows. I have... -
search and sort data
I've got data in a table (fields are page num, part, model, type, price). I'd like a user to enter a part number, for example, and have that record... -
Merge sort and binary search
Hi, I'd just posted 2 articles with sample code, 1 on using merge sort, another on binary search, at http://xtras.calu.us/articles.php . I love to... -
search for duplicates and sort array
Rick L wrote: Whenever someone wants to know if a <something> is a member of a set, then it springs to mind that a hash is desired, not an array.... -
Tom Jordahl #2
Re: how do you sort a collection search
Try using Query of Queries and the 'order by clause:
<cfquery dbtype="query" name="sortedQuery">
select *
FROM OriginalQuery
ORDER BY custom_1
</cfquery>
--
Tom Jordahl
Macromedia Server Development
Tom Jordahl Guest
-
oak3 #3
Re: how do you sort a collection search
Cool. Is there a way to take 2 collections and merge the results this way or would you do the initial query with an 'AND' operator between the select statements?
oak3 Guest
-
Tom Jordahl #4
Re: how do you sort a collection search
Since you are not doing a Query, you can search multiple collections at the
same time if you want by putting a list of collections in the cfsearch tag.
--
Tom Jordahl
Macromedia Server Development
Tom Jordahl Guest



Reply With Quote

