if ($this->p('orderby') and !$count) $sql .= ' ORDER BY '.$this->p('orderby');
- if ($limit = $this->db()->limit) {
- $limit = str_replace(',',' OFFSET ',$limit);
- $sql .= ' LIMIT '.$limit;
+ if ($_limit = $limit = $this->db()->limit) {
+ $_limit = str_replace(' OFFSET ',',',$_limit);
+ $_limit = str_replace(',',' OFFSET ',$_limit);
+ $sql .= ' LIMIT '.$_limit;
} else {
$limit = '';
}
--- /dev/null
+DROP TABLE IF EXISTS css_function;
+CREATE TABLE IF NOT EXISTS css_function (
+ name varchar(100) PRIMARY KEY,
+ description varchar(500),
+ link varchar(300)
+);
+BEGIN TRANSACTION;
+DELETE FROM css_function;
+COPY css_function (link,name,description) FROM PROGRAM '. /etc/profile && \
+http_get https://www.w3schools.com/cssref/css_functions.asp | \
+xmllint --html --xpath "/html/body//div[@id=\"main\"]//table" - 2>/dev/null | \
+sed -E "s, href=\"([^\"]+)\",>https://www.w3schools.com/cssref/\1|</a><a,g" | \
+xml2csv - | \
+grep "|" | \
+sed "s/|/\t/" \
+' WITH (format 'text', NULL '');
+COMMIT;