Add the sorting column to all SQL queries