SQL Formatting in PHP