'name' => 'dbname',
'charset' => 'charset',
] as $k => $v) {
- #self::debug([$k,$this->$k]);
if ($v=='charset' and $this->type=='pgsql') continue;
if (empty($this->$k)) continue;
$this->pdo = preg_replace("/\b$v=[^;]*(;|$)/","",$this->pdo);
$info['rowCount'] = $query->rowCount();
return $query->rowCount();
-# NB 19.10.17
-# NB 19.10.17 return $execute;
-# NB 19.10.17
-# NB 19.10.17 return $this->db()->exec($sql,$values);
-# NB 19.10.17 return $this->db()->exec($sql);
}
public function update($post,&$info=[]) {
--- /dev/null
+DROP TABLE IF EXISTS host_info;
+CREATE TABLE host_info (
+ host VARCHAR(200),
+ key VARCHAR(100) NOT NULL,
+ val VARCHAR(500) NOT NULL,
+ created TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
+ PRIMARY KEY (host,key,created)
+);
+CREATE INDEX IF NOT EXISTS host_info_host ON host_info USING btree (host);
+CREATE INDEX IF NOT EXISTS host_info_key ON host_info USING btree (key);
+CREATE INDEX IF NOT EXISTS host_info_val ON host_info USING btree (val);
+CREATE INDEX IF NOT EXISTS host_info_created ON host_info USING btree (created);
+GRANT ALL ON host_info TO www;