fails to quote column/table identifiers
Closed this issue · 4 comments
mrclay commented
A generated query: SELECT * FROM scrl_context WHERE (key = 'default');
Fails because "key" is a reserved word and must be quoted: key
mrclay commented
(quoted with backticks)
mrclay commented
Ugh. PDO still has no quoteIdentifier(), so fixing this requires sniffing out the DB type from PDO.
vrana commented
This is a documented behavior. You can quote the column name by yourself but the best approach is to avoid keywords in your identifiers.
lkraider commented
This does not work:
$table()->where('"select".name = ?', $name);