▒█▀▀█ █▀▀ █░░█ ▒█▀▀█ █░░█ ░▀░ █▀▀█
▒█▄▄█ ▀▀█ █▄▄█ ▒█░░░ █▀▀█ ▀█▀ █░░█
▒█░░░ ▀▀▀ ▄▄▄█ ▒█▄▄█ ▀░░▀ ▀▀▀ █▀▀▀
table based shared memory operationsupdate(); } public function update() { $this->buffer = $this->mquery("SELECT * FROM " . $this->table); return $this->buffer; } public function install() { $fields = array( 'TITLE' => 'text', 'VALUE' => 'text' ); $hede = $this->newtable('ipc', $fields); return $hede; } public function read($key, $detailed = false) { /* * will return whole db entry on detailed request (array) */ $this->update(); foreach ($this->buffer as $array) { if ($array['TITLE'] == $key) { if ($detailed) { return $array; } else { return $array['VALUE']; } } } } public function destroy() { $cikti = $this->rquery("TRUNCATE TABLE " . $this->table); return $cikti; } public function delete($key) { $val = @$this->rquery("DELETE FROM " . $this->table . " WHERE TITLE='" . $key . "'"); return $val; } public function write($key, $data) { $arr = array(); $val = @$this->aquery("SELECT * FROM " . $this->table . " WHERE TITLE='" . $key . "'"); $arr['TITLE'] = $key; $arr['VALUE'] = $data; $arr['TIMESTAMP'] = time(); if (count($val) > 0) { $newarr = array(); $newarr['VALUE'] = $data; $cikti = parent::update($this->table, $newarr, 'TITLE', $key); $newarr = array(); $newarr['TIMESTAMP'] = time(); $cikti = parent::update($this->table, $newarr, 'TITLE', $key); $this->update(); return $cikti; } else { return $this->insert($this->table, $arr); } } } ?>
libraspi.js
1 Year, 7 Month ago
wifi_sensor_station.ino
serialrelay.ino
sensorstation.ino
class.dbipc.php