Php While Loop Sql Query Compiler Vs Linker