Lines Matching refs:sql
60 $sql = 'SELECT * FROM assignments_patterns ORDER BY pattern';
61 $res = $this->sqlite->query($sql);
76 $sql = 'REPLACE INTO assignments_patterns (pattern, page, pos) VALUES (?,?,?)';
77 $ok = (bool) $this->sqlite->query($sql, array($pattern, $page, $pos));
79 $sql = 'SELECT last_insert_rowid()';
80 $res = $this->sqlite->query($sql);
99 $sql = 'DELETE FROM assignments_patterns WHERE id = ?';
100 $ok = (bool) $this->sqlite->query($sql, array($id));
106 $sql = 'SELECT pid FROM assignments WHERE pattern_id = ?';
107 $res = $this->sqlite->query($sql, $id);
132 $sql = 'DELETE FROM assignments_patterns';
133 $ok = (bool) $this->sqlite->query($sql);
136 $sql = 'DELETE FROM assignments';
138 $sql = 'UPDATE assignments SET assigned = 0';
140 $ok = $ok && (bool) $this->sqlite->query($sql);
157 $sql = 'REPLACE INTO assignments (pid, pattern_id, assigned) VALUES (?, ?, 1)';
158 return (bool) $this->sqlite->query($sql, array($page, $pattern));
170 $sql = 'REPLACE INTO assignments (pid, pattern_id, assigned) VALUES (?, ?, 0)';
171 return (bool) $this->sqlite->query($sql, array($page, $pattern));
208 $sql = 'SELECT assignments_patterns.page
214 $res = $this->sqlite->query($sql, array($page, $pos));
276 $sql = 'SELECT assignments.pid, assignments.pattern_id, assignments_patterns.pos
280 $res = $this->sqlite->query($sql, $pattern);