Add escaping to table names.

SQLite was not quoting table names, so tables with
keywords caused errors.

Fixes #2702
This commit is contained in:
mark_story 2012-03-21 20:56:08 -04:00
parent 0a94202fb6
commit 20bdf1d7b0

View file

@ -166,7 +166,9 @@ class Sqlite extends DboSource {
return $cache;
}
$fields = array();
$result = $this->_execute('PRAGMA table_info(' . $table . ')');
$result = $this->_execute(
'PRAGMA table_info(' . $this->value($table, 'string') . ')'
);
foreach ($result as $column) {
$column = (array)$column;