Lines Matching refs:sql
23 * which processes updateXXXX.sql files
72 $sql = "REPLACE INTO opts (val,opt) VALUES ($version,'dbversion_structpublish')";
73 $ok = $ok && $sqlite->query($sql);
90 $sql = 'SELECT opt, val FROM opts WHERE opt=? OR opt=?';
91 $vals = $sqlite->queryAll($sql, ['dbversion', 'dbversion_structpublish']);
126 $sql = io_readFile(DOKU_PLUGIN . 'structpublish/db/update0001.sql', false);
127 $sqlArr = Tools::SQLstring2array($sql);
128 foreach ($sqlArr as $sql) {
129 $ok = $ok && $sqlite->query($sql);
145 $sql = "SELECT rid, pid, latest, col1, max(col4) FROM $this->table GROUP BY pid, col1";
146 $latest = $sqlite->queryAll($sql);
149 $sql = "UPDATE $this->table SET latest = 0 WHERE rid NOT IN (" . implode(', ', $rids) . ')';
151 return (bool) $sqlite->query($sql);
163 $sql = "WITH cte AS (
175 $latest = $sqlite->queryAll($sql);
178 $sql = "UPDATE $this->table SET latest = 0 WHERE rid NOT IN (" . implode(', ', $rids) . ')';
180 return (bool) $sqlite->query($sql);