Lines Matching refs:tbl
76 $sql = 'REPLACE INTO schema_assignments_patterns (pattern, tbl) VALUES (?,?)';
97 $sql = 'DELETE FROM schema_assignments_patterns WHERE pattern = ? AND tbl = ?';
104 $sql = 'SELECT pid FROM schema_assignments WHERE tbl = ?';
130 $sql = 'SELECT tbl FROM schema_assignments WHERE pid = ?';
135 if (in_array($row['tbl'], $tables)) {
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)';
222 $tables[] = $row['tbl'];
227 $sql = 'SELECT tbl FROM schema_assignments WHERE pid = ? AND assigned = 1';
230 $tables[] = $row['tbl'];
246 $sql = 'SELECT pid, tbl, assigned FROM schema_assignments WHERE 1=1';
250 $sql .= ' AND tbl = ?';
257 $sql .= ' ORDER BY pid, tbl';
264 $tbl = $row['tbl'];
266 $result[$pid][$tbl] = (bool)$row['assigned'];
323 $sql = "SELECT DISTINCT tbl FROM schemas WHERE ts <= ? ORDER BY ts DESC";
328 $table = $row['tbl'];
347 $sql = 'SELECT pid FROM schema_assignments WHERE tbl != ? OR assigned != 1';