Different behavior depends on type of assigned value
string
usage without modification
null
will be expanded to full list of quoted table column names (quoting depends on database)
array
- Column names will be quoted if used as key or value of array
array('col1', 'col2', 'col2')
SELECT col1, col2, col3 FROM...
- Column aliasing
array('mycol1' => 'col1', 'mycol2' => 'COUNT(*)')
SELECT col1 AS mycol1, COUNT(*) AS mycol2 FROM...
- NULL and scalar values (strings will be quoted depending on database)
array('col1' => 'my custom string', 'col2' => 1.0, 'col3' => 'NULL')
SELECT "my custom string" AS col1, 1.0 AS col2, NULL AS col3 FROM...
- If the *-wildcard char is used as key or value, add the full list of quoted table column names
array('col1' => 'NULL', '*')
SELECT col1, col2, col3, NULL AS col1 FROM...