how would this work for you? http://www.kryogenix.org/code/browser/sorttable/
> > -----Original Message----- > From: Orlini, Robert [mailto:[EMAIL PROTECTED] > Sent: Friday, September 16, 2005 3:42 PM > To: CF-Talk > Subject: Sort records w/same search > > How do I do a sort on records that already have been searched and are > displayed? > > I have a button that's called "ascend" and when clicked I want it to sort > the selected records displayed but it sorts and displays the entire record > count. > > For example on the search on lname it finds 7 records. In the display screen > for those 7 records I want to sort them and the cfif isdefind takes care of > that but of course it doesn't know the #form.lname# of the initial search > and sorts through and displays all records. I guess I use a variable of some > sort? Sorry its been a while. > > Any help appreciated. Thanks. > > Robert O. > > Here is the code: > > <cfquery name="Getpc" datasource="pc_inventory"> > SELECT * FROM inventory where 0 = 0 > > <CFIF IsDefined("FORM.lname") and form.lname NEQ ""> > And lname LIKE '#FORM.lname#%' > </CFIF> > > <CFIF IsDefined("form.ascend.x")> > Order by pcname desc > <CFELSE> > Order By ID DESC > </cfif> > > </cfquery> > > > > -- > No virus found in this outgoing message. > Checked by AVG Anti-Virus. > Version: 7.0.344 / Virus Database: 267.11.1/104 - Release Date: 9/16/2005 > > > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Discover CFTicket - The leading ColdFusion Help Desk and Trouble Ticket application http://www.houseoffusion.com/banners/view.cfm?bannerid=48 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:218541 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

