Php While Loop Sql Query Practices Synonym