Sorting data using php mysql source code