fix dynamic table access. closes #659

Table names can not be passed as parameters via PDO.
This commit is contained in:
Andreas Gohr
2023-08-08 10:29:01 +02:00
parent cdc8974e86
commit 84ce8119d0

View File

@ -24,11 +24,15 @@ class AccessTableGlobal extends AccessTable
if (!$this->rid) return; // no data
/** @noinspection SqlResolve */
$sql = 'DELETE FROM ? WHERE rid = ?';
$this->sqlite->query($sql, 'data_' . $this->schema->getTable(), $this->rid);
$this->sqlite->query($sql, 'multi_' . $this->schema->getTable(), $this->rid);
$sql = 'DELETE FROM data_' . $this->schema->getTable() . ' WHERE rid = ?';
$this->sqlite->query($sql, $this->rid);
$sql = 'DELETE FROM multi_' . $this->schema->getTable() . ' WHERE rid = ?';
$this->sqlite->query($sql, $this->rid);
}
/**
* @inheritDoc
*/
protected function getLastRevisionTimestamp()
{
return 0;