Lines Matching defs:sql
136 * @param string $sql
141 public function query($sql, ...$parameters)
149 $stmt = $this->pdo->prepare($sql);
155 'sql' => &$sql,
168 'sql' => $sql,
182 * @param string $sql
187 public function exec($sql, ...$parameters)
189 $stmt = $this->query($sql, ...$parameters);
193 if ($count && preg_match('/^INSERT /i', $sql)) {
205 * @param string $sql
210 public function queryAll($sql, ...$params)
212 $stmt = $this->query($sql, ...$params);
221 * @param string $sql
226 public function queryRecord($sql, ...$params)
228 $stmt = $this->query($sql, ...$params);
259 $sql = $command . ' INTO "' . $table . '" (' . implode(',', $columns) . ') VALUES (' . implode(
263 $stm = $this->query($sql, $values);
268 $sql = 'SELECT * FROM "' . $table . '" WHERE rowid = last_insert_rowid()';
269 return $this->queryRecord($sql);
277 * @param string $sql
282 public function queryValue($sql, ...$params)
284 $result = $this->queryAll($sql, ...$params);
296 * @param string $sql
300 public function queryKeyValueList($sql, ...$params)
302 $result = $this->queryAll($sql, ...$params);
378 $tables = $this->queryAll("SELECT name,sql FROM sqlite_master WHERE type='table'");
379 $indexes = $this->queryAll("SELECT name,sql FROM sqlite_master WHERE type='index'");
386 fwrite($fp, $table['sql'] . ";\n");
390 $sql = "SELECT * FROM " . $table['name'];
391 $res = $this->query($sql);
403 fwrite($fp, $index['sql'] . ";\n");
443 $sql = Tools::SQLstring2array(file_get_contents($data['file']));
444 foreach ($sql as $query) {
495 $sql = "CREATE TABLE IF NOT EXISTS opts (opt TEXT NOT NULL PRIMARY KEY, val NOT NULL DEFAULT '')";
496 $this->exec($sql);
523 return sprintf($this->schemadir . '/update%04d.sql', $version);