mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 17:16:18 +00:00
Add escaping to table names.
SQLite was not quoting table names, so tables with keywords caused errors. Fixes #2702
This commit is contained in:
parent
0a94202fb6
commit
20bdf1d7b0
1 changed files with 3 additions and 1 deletions
|
@ -166,7 +166,9 @@ class Sqlite extends DboSource {
|
||||||
return $cache;
|
return $cache;
|
||||||
}
|
}
|
||||||
$fields = array();
|
$fields = array();
|
||||||
$result = $this->_execute('PRAGMA table_info(' . $table . ')');
|
$result = $this->_execute(
|
||||||
|
'PRAGMA table_info(' . $this->value($table, 'string') . ')'
|
||||||
|
);
|
||||||
|
|
||||||
foreach ($result as $column) {
|
foreach ($result as $column) {
|
||||||
$column = (array)$column;
|
$column = (array)$column;
|
||||||
|
|
Loading…
Add table
Reference in a new issue