Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- TABLE: 'config'
- id c_key c_value
- 1 facebook a:1:{i:0;s:8:"Newsfeed";}
- 2 mg_notification_msv to.aaaa.org
- public function db_get_config($key, $default = null)
- {
- if (!empty($key)) {
- // $record = $this->db_get_record($this->tables['config'], array('c_key' => $key));
- $record = $this->db->from($this->tables['config'])->where(array('c_key' => $key))->limit(1)->get()->row_array();
- if (!empty($record)) {
- $value = unserialize($record['c_value']); // Message: unserialize(): Error at offset 0 of 15 bytes
- if ($value === false) {
- $value = $record['c_value'];
- }
- return $value;
- }
- }
- return $default;
- }
Add Comment
Please, Sign In to add comment