Php While Loop Sql Query Compiler Vs Cross