|
@@ 31-33 (lines=3) @@
|
| 28 |
|
} |
| 29 |
|
|
| 30 |
|
private function _storeValue($name, $value){ |
| 31 |
|
if (empty(self::$__SetSTMT)){ |
| 32 |
|
self::$__SetSTMT = $this->mysqli->prepare('REPLACE INTO '.$this->table.' (`account_id`, `name`, `value`) VALUES (?, ?, ?)'); |
| 33 |
|
} |
| 34 |
|
$val = serialize($value); |
| 35 |
|
if (!(self::$__SetSTMT && self::$__SetSTMT->bind_param('iss', $this->account_id, $name, $val) && self::$__SetSTMT->execute())) { |
| 36 |
|
$this->setErrorMessage($this->getErrorMsg('E0084', $this->table)); |
|
@@ 43-45 (lines=3) @@
|
| 40 |
|
} |
| 41 |
|
|
| 42 |
|
private function _getValue($name, $default = null){ |
| 43 |
|
if (empty(self::$__GetSTMT)){ |
| 44 |
|
self::$__GetSTMT = $this->mysqli->prepare('SELECT `value` FROM '.$this->table.' WHERE `account_id` = ? AND `name` = ? LIMIT 1'); |
| 45 |
|
} |
| 46 |
|
if (self::$__GetSTMT && self::$__GetSTMT->bind_param('is', $this->account_id, $name) && self::$__GetSTMT->execute() && $result = self::$__GetSTMT->get_result()) { |
| 47 |
|
if ($result->num_rows > 0) { |
| 48 |
|
return unserialize($result->fetch_object()->value); |