Пример #1
0
 public function __construct(array $options = [])
 {
     parent::__construct($options);
     $result = parent::exec("describe site", true);
     $this->table = $result === false ? 'settings' : 'site';
     $this->setCovers();
     return $this->pdo;
 }
Пример #2
0
 public function updateItem($setting, $value)
 {
     $db = new DB();
     $sql = sprintf("update settings set value = %s where setting = %s", $db->escapeString($value), $db->escapeString($setting));
     return $db->exec($sql);
 }