array( "Key" => "Key", "Value" => "Value" ), 'timestamp' => array( "LastChanged" => "LastChanged" ) ); public static function ByKey($key, $cache_duration = 60) { return Setting::CreateFromQuery("SELECT * FROM settings WHERE `Key` = :Key", array(":Key" => $key), $cache_duration, true); } public function ChangeValue($value) { $this->uValue = $value; $this->uLastChanged = time(); $this->InsertIntoDatabase(); } }