This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Any way to sort result set?

 
Christopher Paul
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My program needs to display different "views" of a database. Basically I need the user to be able to sort the result set for any column.

Is there any slick way to do this?

I was thinking of putting the entire result set into a two-dimensional array, and then trying to sort it, but that seems inefficient.

Thanks!
 
Christopher Paul
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok, so I'm an idiot and didn't know about the ORDER BY command in SQL.

:roll:
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Oh.
Thank you for the update
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic