Python and MySQL - Ordering our Queries and Results