Issues

ZF-165: cannot quote coloum names in sqlite

Description

Using SQlite, when I try to do something like this:

$colName='test'; $sql=db->quoteInto("SELECT DISTINCT ? FROM sometable", $colName);

it will result in a string like this:

"SELECT DISTINCT 'test' FROM sometable"

which in sqlite will return a row with one coloumn named 'test' with the value 'test' no matter what's in the database in the coloums 'test'.

Comments

Duplicates [ZF-1].

Also, prepared queries do not normally allow binding column and table names (e.g. MySQL 5 does not permit this). Nevertheless, the framework should facilitate quoting/escaping column and table names.

No further comments received. Closing this duplicate.