Home
last modified time | relevance | path

Searched refs:sql (Results 151 – 175 of 186) sorted by path

12345678

/plugin/sqlite/
H A Dhelper.php159 * @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 Dsyntax.php809 $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 Dhelper.php60 $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 Daction.php178 $sql = "SELECT `info` FROM " . $hlp->prefix . "history WHERE `dt` = DATE(NOW())";
179 $result = $hlp->runSQL($sql);
/plugin/statistics/inc/
H A DStatisticsLogger.class.php71 $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 DStatisticsQuery.class.php16 $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 Ddriver.php137 * 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 Dtriples.php129 $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 Dmigration.php59 $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 Dmove.php103 $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 Dimexport.php43 $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 DAccessTable.php336 $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 DAccessTableGlobal.php27 $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 DAccessTablePage.php58 $sql = "SELECT rev FROM $table $where ORDER BY rev DESC LIMIT 1";
59 $ret = $this->sqlite->queryValue($sql, $opts);
H A DAssignments.php62 $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 DPageMeta.php41 $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 DQueryBuilder.php207 * @return array ($sql, $vals)
229 $sql =
235 $sql .=
240 $sql .=
244 return [$sql, array_values($this->values)];
255 fixPlaceholders($sql) global() argument
H A DQueryBuilderWhere.php120 $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 DSchema.php72 $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 DSchemaBuilder.php157 $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 DSearch.php468 [$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 DSearchCloud.php19 * @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 DLookup.php253 $sql = $QB->getSelectStatement($alias);
254 $QB->addSelectStatement("STRUCT_JSON($tablealias.$colname, $sql)", $alias);
H A DTag.php58 $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 Dmigration.php23 * 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...]

12345678