I am creating another report where the column header has the following in a TR
FILE APPLICANT DATE ASSIGNED STATUS
123456 John Doe 3/22/09 Inspected
543211 Tom Foolery 4/1/09 Closed
I want to be able to click on status and each time it sort by a different status. Click it the first time, it will go according to the next letter in the alphabet or untill it finds the next avaialble letter in the alpha where it can sort by it. Then the next time it will move to the next letter untill it cycles back to "A".
I want to be able to sort by date assigned in a similar manner. Code below is all I could find on the web. Tweaked a little before I came here. Can someone explain to me how this can be done please.
<!--- retrieve all alpha's from the db --->
<cfquery name="Assignments" datasource="shs">
SELECT COUNT(LEFT(status,1)) AS AlphaCnt, LEFT(status,1) AS Alpha
GROUP BY LEFT(status,1)
ORDER BY LEFT(status,1) ASC