## You can do this, and not worry about quoting: $query = "SELECT x, y, z from table where a = ?"; ## This doesn't work the way you think it does: $query = "SELECT ? from table where a = 'blah'";