Lines Matching refs:sql
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 .= "AND GETACCESSLEVEL(D.pid) > 0\n";
106 $sql .= ")) ";
108 $sql .= "AND D.latest = 1\n";
109 $sql .= "AND value LIKE ?\n";
110 $sql .= 'ORDER BY value';
112 return $sql;