Listing the data in order

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sang
    New Member
    • Sep 2006
    • 83

    Listing the data in order

    Hi
    In my application i am using the jsp and mysql database. in this i am viewing the candidate name , age , Priority ect.. now i want to update my application with some future. That is the headings are in button. if i click the Name button it should shows the name in asc and the next click it shows the desc order. i don't know how can i do it. in the same way i want to do the age and priority also.

    Any one please help to do it.

    Thankyou very much.
  • r035198x
    MVP
    • Sep 2006
    • 13225

    #2
    Originally posted by sang
    Hi
    In my application i am using the jsp and mysql database. in this i am viewing the candidate name , age , Priority ect.. now i want to update my application with some future. That is the headings are in button. if i click the Name button it should shows the name in asc and the next click it shows the desc order. i don't know how can i do it. in the same way i want to do the age and priority also.

    Any one please help to do it.

    Thankyou very much.
    What did you use to display the data? An HTML table? If so then you need to use Javascript( not Java) to sort that.

    Comment

    • BigDaddyLH
      Recognized Expert Top Contributor
      • Dec 2007
      • 1216

      #3
      Originally posted by r035198x
      What did you use to display the data? An HTM table? If so then you need to use Javascript( not Java) to sort that.
      You can sort it on the client using ECMAScript (sometimes called JavaScript) or you may need to do a round trip to the server and sort it there -- you may even end up generating a different SQL SELECT with appropriate ORDER BY clause in your back end code.

      Some web frameworks like JSF make this table support easy.

      Comment

      Working...