Bug Report #4264
Problem quoting columns.
| Status: | Closed | Start date: | 09/18/2011 | |
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assignee: | % Done: | 0% |
||
| Category: | - | |||
| Target version: | Kohana v3.x - v3.2.1 | |||
| Resolution: | invalid | Points: | 1 |
Description
KO 3.2 doesn't quote columns.
1 $query = db::insert()->table($this->__table)->columns(array_keys($data))->values(array_values($data));When in columns is column called key I've got syntax error because key is a part of SQL language, It should be quoted...
1 SELECT `column1`, `column2`, `key` FROM
Related issues
History
Updated by Isaiah DeRose-Wilson 8 months ago
- Status changed from New to Closed
- Assignee set to Isaiah DeRose-Wilson
- Priority changed from Low to Normal
- Resolution changed from fixed to invalid
It sounds like you are using the PDO driver and forgot to set an identifier in your config. PDO doesn't use anything to quote columns by default. Check your config file and make sure you've specified an `identifier` value in it if you want your columns quoted.
Updated by Isaiah DeRose-Wilson 8 months ago
- Project changed from Kohana v3.x to Database
- Category deleted (
Modules:Database)