public $__table = 'config'; // table name
public $section; // varchar(32) primary_key not_null
public $setting; // varchar(32) primary_key not_null
public $__table = 'config'; // table name
public $section; // varchar(32) primary_key not_null
public $setting; // varchar(32) primary_key not_null
- public $value; // varchar(255)
-
- /* Static get */
- function staticGet($k,$v=NULL) { return Memcached_DataObject::staticGet('Config',$k,$v); }
+ public $value; // varchar(191) not 255 because utf8mb4 takes more space
'fields' => array(
'section' => array('type' => 'varchar', 'length' => 32, 'not null' => true, 'default' => '', 'description' => 'configuration section'),
'setting' => array('type' => 'varchar', 'length' => 32, 'not null' => true, 'default' => '', 'description' => 'configuration setting'),
'fields' => array(
'section' => array('type' => 'varchar', 'length' => 32, 'not null' => true, 'default' => '', 'description' => 'configuration section'),
'setting' => array('type' => 'varchar', 'length' => 32, 'not null' => true, 'default' => '', 'description' => 'configuration setting'),
- 'value' => array('type' => 'varchar', 'length' => 255, 'description' => 'configuration value'),
+ 'value' => array('type' => 'varchar', 'length' => 191, 'description' => 'configuration value'),
- $settings = self::_getSettings();
- if (!empty($settings)) {
- self::_applySettings($settings);
+ try {
+ $settings = self::_getSettings();
+ if (!empty($settings)) {
+ self::_applySettings($settings);
+ }
+ } catch (Exception $e) {
+ return;