/plugin/sqlite/ |
H A D | helper.php | 159 * @param string ...$args - the arguments of query(), the first is the sql and others are values 167 $sql = $this->prepareSql($args); 168 return $this->adapter->query($sql); 182 * - string $sql - the statement 190 $sql = trim(array_shift($args)); 191 $sql = rtrim($sql, ';'); 193 if (!$sql) { 204 $qmc = substr_count($sql, '?'); 207 'Expected ' . $qmc . ' got ' . $argc . ' - ' . hsc($sql)); 392 SQLstring2array($sql) global() argument 403 doTransaction($sql, $sqlpreparing = true) global() argument [all...] |
/plugin/sqlraw/ |
H A D | syntax.php | 809 $sql = 'INSERT INTO `'.$table.'` VALUES('; 813 $sql .= '\''.$database->escapeSimple($field).'\', '; 817 $sql = rtrim($sql, ', '); 818 $sql .= ');'; 819 $result =& $database->query ($sql); 821 …$renderer->doc .= '<div class="error">INSERT INTO TABLE failed for query: '. $sql .'the error: '. …
|
/plugin/starred/ |
H A D | helper.php | 60 $sql = "DELETE FROM stars WHERE pid = ? AND login = ?"; 61 $db->exec($sql, [$pageid, $user]); 65 $db->exec($sql, [$pageid, $user, time()]); 90 $sql = "SELECT stardate FROM stars WHERE pid = ? AND login = ?"; 91 return (int)$db->queryValue($sql, [$pageid, $user]); 115 $sql = "SELECT pid, stardate FROM stars WHERE "; 118 $sql .= 'lower(login) = lower(?)'; 120 $sql .= 'login = ?'; 122 $sql .= " ORDER BY stardate DESC"; 124 $sql .= ' LIMIT ' . $limit; [all …]
|
/plugin/statistics/ |
H A D | action.php | 178 $sql = "SELECT `info` FROM " . $hlp->prefix . "history WHERE `dt` = DATE(NOW())"; 179 $result = $hlp->runSQL($sql);
|
/plugin/statistics/inc/ |
H A D | StatisticsLogger.class.php | 71 $sql = "REPLACE INTO " . $this->hlp->prefix . "lastseen 74 $this->hlp->runSQL($sql); 100 $sql = "INSERT DELAYED INTO " . $this->hlp->prefix . "groups 104 $sql .= "( NOW(), '$type', '$group' ),"; 106 $sql = rtrim($sql, ','); 108 $ok = $this->hlp->runSQL($sql); 189 $sql = "INSERT INTO " . $this->hlp->prefix . "search 194 $id = $this->hlp->runSQL($sql); 200 $sql [all...] |
H A D | StatisticsQuery.class.php | 16 $sql = "SELECT ref_type, COUNT(*) as cnt 21 $result = $this->hlp->runSQL($sql); 31 $sql = "SELECT COUNT(DISTINCT session) as sessions, 38 $result = $this->hlp->runSQL($sql); 47 $sql = "SELECT COUNT(*) as cnt 51 $result = $this->hlp->runSQL($sql); 64 $result = $this->hlp->runSQL($sql); 69 $sql = "SELECT AVG(views) as cnt 72 $result = $this->hlp->runSQL($sql); 76 $sql [all...] |
/plugin/strata/driver/ |
H A D | driver.php | 137 * This implementation looks for a file called 'setup-@driver@.sql' and executes all SQL statements in that file. 150 $sqlfile = DOKU_PLUGIN . "strata/sql/setup-$driver.sql"; 152 $sql = io_readFile($sqlfile, false); 153 $lines = explode("\n",$sql); 157 $sql = ''; 161 $sql .= $line; 165 $sql = explode(';', $sql); 170 foreach($sql a [all...] |
/plugin/strata/helper/ |
H A D | triples.php | 129 $sql = "DELETE FROM ".self::$writable." WHERE ". implode(" AND ", $filters); 132 $query = $this->_db->prepare($sql); 176 $sql = "SELECT subject, predicate, object, graph FROM ".self::$readable." WHERE ". implode(" AND ", $filters).$scopeRestriction; 179 $query = $this->_db->prepare($sql); 217 $sql = "INSERT INTO ".self::$writable."(subject, predicate, object, graph) VALUES(?, ?, ?, ?)"; 218 $query = $this->_db->prepare($sql); 251 list($sql, $literals, $projected, $grouped) = $generator->translate($queryTree); 254 $query = $this->_db->prepare($sql); 265 msg(sprintf($this->getLang('debug_sql'),hsc($sql)),-1); 518 'sql' [all...] |
/plugin/struct/action/ |
H A D | migration.php | 59 $sql = "SELECT name FROM sqlite_master WHERE type = 'table' AND name LIKE 'multi_%'"; 60 $tables = $sqlite->queryAll($sql); 64 $sql = "ALTER TABLE $table ADD COLUMN latest INT DEFAULT 1"; 65 $sqlite->query($sql); 82 $sql = "SELECT sql, name FROM sqlite_master 85 $tables = $sqlite->queryAll($sql); 88 $sql = "SELECT MAX(id) AS id, tbl, islookup FROM schemas 91 $schemas = $sqlite->queryAll($sql); 98 $sql [all...] |
H A D | move.php | 103 $sql = "UPDATE data_$tbl SET pid = ? WHERE pid = ?"; 104 $this->db->query($sql, [$new, $old]); 107 $sql = "UPDATE multi_$tbl SET pid = ? WHERE pid = ?"; 108 $this->db->query($sql, [$new, $old]); 121 $sql = "UPDATE schema_assignments SET pid = ? WHERE pid = ?"; 122 $this->db->query($sql, [$new, $old]); 136 $sql = "UPDATE titles SET pid = ? WHERE pid = ?"; 137 $this->db->query($sql, [$new, $old]); 156 $sql = "UPDATE multi_$table 163 $sql [all...] |
/plugin/struct/helper/ |
H A D | imexport.php | 43 $sql = []; 44 $sql[] = "DELETE FROM schema_assignments_patterns WHERE tbl = '$schemaName'"; 45 $sql[] = "DELETE FROM schema_assignments WHERE tbl = '$schemaName'"; 48 $sql[] = "INSERT INTO schema_assignments_patterns (pattern, tbl) VALUES ('$pattern','$schemaName')"; 51 $this->sqlite->doTransaction($sql); 69 $sql = 'SELECT pattern FROM schema_assignments_patterns WHERE tbl = ?'; 70 $patterns = $this->sqlite->queryAll($sql, $schemaName);
|
/plugin/struct/meta/ |
H A D | AccessTable.php | 336 $sql = array_shift($query); 337 $ok = $ok && $this->sqlite->query($sql, $query); 443 [$sql, $opt] = $this->buildGetDataSQL($idColumn); 445 return $this->sqlite->queryAll($sql, $opt);
|
H A D | AccessTableGlobal.php | 27 $sql = 'DELETE FROM data_' . $this->schema->getTable() . ' WHERE rid = ?'; 28 $this->sqlite->query($sql, $this->rid); 29 $sql = 'DELETE FROM multi_' . $this->schema->getTable() . ' WHERE rid = ?'; 30 $this->sqlite->query($sql, $this->rid);
|
H A D | AccessTablePage.php | 58 $sql = "SELECT rev FROM $table $where ORDER BY rev DESC LIMIT 1"; 59 $ret = $this->sqlite->queryValue($sql, $opts);
|
H A D | Assignments.php | 62 $sql = 'SELECT * FROM schema_assignments_patterns ORDER BY pattern'; 63 $this->patterns = $this->sqlite->queryAll($sql); 76 $sql = 'REPLACE INTO schema_assignments_patterns (pattern, tbl) VALUES (?,?)'; 77 $ok = (bool)$this->sqlite->query($sql, [$pattern, $table]); 97 $sql = 'DELETE FROM schema_assignments_patterns WHERE pattern = ? AND tbl = ?'; 98 $ok = (bool)$this->sqlite->query($sql, [$pattern, $table]); 104 $sql = 'SELECT pid FROM schema_assignments WHERE tbl = ?'; 105 $pagerows = $this->sqlite->queryAll($sql, [$table]); 130 $sql = 'SELECT tbl FROM schema_assignments WHERE pid = ?'; 131 $tablerows = $this->sqlite->queryAll($sql, [ [all...] |
H A D | PageMeta.php | 41 $sql = "SELECT pid, title, lasteditor, lastrev, lastsummary FROM titles WHERE pid = ?"; 42 $data = $this->sqlite->queryRecord($sql, [$this->pid]); 51 $sql = "REPLACE INTO titles (pid, title, lasteditor, lastrev, lastsummary) VALUES (?,?,?,?,?)"; 52 $this->sqlite->query($sql, [$this->pid, $this->title, $this->lasteditor, $this->lastrev, $this->lastsummary]);
|
H A D | QueryBuilder.php | 207 * @return array ($sql, $vals) 229 $sql = 235 $sql .= 240 $sql .= 244 return [$sql, array_values($this->values)]; 255 fixPlaceholders($sql) global() argument
|
H A D | QueryBuilderWhere.php | 120 $sql = ' '; 121 if (!$first) $sql .= $this->type . ' '; 125 $sql .= '('; 127 $sql .= $where->toSQL($first); 130 $sql .= ' )'; 132 $sql .= $this->statement; 135 return $sql;
|
H A D | Schema.php | 72 $sql = "SELECT * 80 $sql = "SELECT * 87 $schema = $this->sqlite->queryAll($sql, $opt); 102 $sql = "SELECT SC.*, T.* 108 $rows = $this->sqlite->queryAll($sql, [$this->id]); 196 $sql = "DROP TABLE "; 197 $this->sqlite->query($sql . 'data_' . $this->table); 198 $this->sqlite->query($sql . 'multi_' . $this->table); 200 $sql = "DELETE FROM schema_assignments WHERE tbl = '$this->table'"; 201 $this->sqlite->query($sql); [all...] |
H A D | SchemaBuilder.php | 157 $sql = "INSERT INTO schemas (tbl, ts, user, config) VALUES (?, ?, ?, ?)"; 158 $this->sqlite->query($sql, [$this->table, $this->time, $this->user, $config]); 318 $sql = "CREATE TABLE $tbl ( 326 $ok = $ok && (bool)$this->sqlite->query($sql); 329 $sql = "CREATE TABLE $tbl ( 340 $ok = $ok && (bool)$this->sqlite->query($sql); 354 $sql = " ALTER TABLE $tbl ADD COLUMN col$index DEFAULT ''"; 355 if (!$this->sqlite->query($sql)) {
|
H A D | Search.php | 468 [$sql, $opts] = $this->getSQL(); 471 $res = $this->sqlite->query($sql, $opts); 472 if ($res === false) throw new StructException("SQL execution failed for\n\n$sql"); 489 * @return array ($sql, $opts) The SQL and parameters to execute
|
H A D | SearchCloud.php | 19 * @return array ($sql, $opts) The SQL and parameters to execute 84 [$sql, $opts] = $QB->getSQL(); 85 return [$sql . $this->limit, $opts]; 107 [$sql, $opts] = $this->getSQL(); 110 $res = $this->sqlite->query($sql, $opts); 111 if ($res === false) throw new StructException("SQL execution failed for\n\n$sql");
|
/plugin/struct/types/ |
H A D | Lookup.php | 253 $sql = $QB->getSelectStatement($alias); 254 $QB->addSelectStatement("STRUCT_JSON($tablealias.$colname, $sql)", $alias);
|
H A D | Tag.php | 58 $sql = $this->buildSQLFromContext($context); 64 $rows = $sqlite->queryAll($sql, $opt); 78 * Create the sql to query the database for tags to do autocompletion 84 * @return string The sql with a single "?" placeholde for the search value 88 $sql = ''; 91 $sql .= "SELECT DISTINCT value 98 $sql .= "SELECT DISTINCT col{$context->getColref()} AS value 103 $sql .= "AND ( D.pid = '' OR ("; 104 $sql .= "PAGEEXISTS(D.pid) = 1\n"; 105 $sql [all...] |
/plugin/structpublish/action/ |
H A D | migration.php | 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); [all...] |