Skip to content

Commit 84ce811

Browse files
committed
fix dynamic table access. closes #659
Table names can not be passed as parameters via PDO.
1 parent cdc8974 commit 84ce811

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

meta/AccessTableGlobal.php

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,15 @@ public function clearData()
2424
if (!$this->rid) return; // no data
2525

2626
/** @noinspection SqlResolve */
27-
$sql = 'DELETE FROM ? WHERE rid = ?';
28-
$this->sqlite->query($sql, 'data_' . $this->schema->getTable(), $this->rid);
29-
$this->sqlite->query($sql, 'multi_' . $this->schema->getTable(), $this->rid);
27+
$sql = 'DELETE FROM data_' . $this->schema->getTable() . ' WHERE rid = ?';
28+
$this->sqlite->query($sql, $this->rid);
29+
$sql = 'DELETE FROM multi_' . $this->schema->getTable() . ' WHERE rid = ?';
30+
$this->sqlite->query($sql, $this->rid);
3031
}
3132

33+
/**
34+
* @inheritDoc
35+
*/
3236
protected function getLastRevisionTimestamp()
3337
{
3438
return 0;

0 commit comments

Comments
 (0)