Lines Matching defs:pid
104 $sql = 'SELECT pid FROM schema_assignments WHERE tbl = ?';
109 $tables = $this->getPageAssignments($row['pid'], true);
111 $this->deassignPageSchema($row['pid'], $table);
121 * @param string $pid
123 public function reevaluatePageAssignments($pid)
127 $tables = $this->getPageAssignments($pid, true);
130 $sql = 'SELECT tbl FROM schema_assignments WHERE pid = ?';
131 $tablerows = $this->sqlite->queryAll($sql, [$pid]);
136 $this->assignPageSchema($pid, $row['tbl']);
138 $this->deassignPageSchema($pid, $row['tbl']);
178 $sql = 'REPLACE INTO schema_assignments (pid, tbl, assigned) VALUES (?, ?, 1)';
191 $sql = 'REPLACE INTO schema_assignments (pid, tbl, assigned) VALUES (?, ?, 0)';
227 $sql = 'SELECT tbl FROM schema_assignments WHERE pid = ? AND assigned = 1';
246 $sql = 'SELECT pid, tbl, assigned FROM schema_assignments WHERE 1=1';
257 $sql .= ' ORDER BY pid, tbl';
263 $pid = $row['pid'];
265 if (!isset($result[$pid])) $result[$pid] = [];
266 $result[$pid][$tbl] = (bool)$row['assigned'];
330 $sql = "SELECT pid FROM data_$table WHERE pid = ? AND rev <= ? LIMIT 1";
347 $sql = 'SELECT pid FROM schema_assignments WHERE tbl != ? OR assigned != 1';
351 $tables = $this->getPageAssignments($row['pid'], true);
353 $this->assignPageSchema($row['pid'], $table);