Aliases in SQL and Sorting Tables with jQuery

Today I learned:

Aliases for Tables in SQL

In your FROM statements, you can give tables temporary aliases to make them easier to refer to throughout the rest of the query using AS:

SELECT o.OrderID, o.Total, m.MemberName FROM Members AS m, Orders AS o WHERE m.MemberName="John Smith" AND m.MemberID=o.MemberID ORDER BY o.OrderID;

Sorting tables with jQuery

This Tablesorter jQuery plugin is nifty. It make sorting tables on the fly quick and easy. Tablesorter.com lays out all of the specs.

Lay out your table with

and

tags, then tell tablesorter where to find your table:

$(document).ready(function()      {          $("#myTable").tablesorter();      }  ); 

See it in action:

ID Name Age Skill
1 Jessica 31 SQL
2 Frank 68 TCL
3 Jason 12 jQuery
4 Tim 43 PHP



Comments

Leave a Reply

Webmentions

If you've written a response on your own site, you can enter that post's URL to reply with a Webmention.

The only requirement for your mention to be recognized is a link to this post in your post's content. You can update or delete your post and then re-submit the URL in the form to update or remove your response from this page.

Learn more about Webmentions.