In php we can append strings in many ways.
Method 1 ---------------------------- $sql = \"SELECT field1, \";
creating the query itself doesn't take the smallest amount of memory or cpu(it does but in such small nr that it doesnt matter) from your computer but running it, is what you should be concerned about, make sure you have a proper index and so on