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
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking
application. Start tracking and documenting hours spent on a project or with a
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:218526
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=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54