3 * Table Definition for local_group
6 class Local_group extends Memcached_DataObject
9 /* the code below is auto generated do not remove the above tag */
11 public $__table = 'local_group'; // table name
12 public $group_id; // int(4) primary_key not_null
13 public $nickname; // varchar(64) unique_key
14 public $created; // datetime not_null default_0000-00-00%2000%3A00%3A00
15 public $modified; // timestamp not_null default_CURRENT_TIMESTAMP
18 function staticGet($k,$v=NULL) { return Memcached_DataObject::staticGet('Local_group',$k,$v); }
20 /* the code above is auto generated do not remove the tag below */
23 function sequenceKey()
25 return array(false, false, false);
28 function setNickname($nickname)
31 $qry = 'UPDATE local_group set nickname = "'.$nickname.'" where group_id = ' . $this->group_id;
33 $result = $this->query($qry);
36 $this->nickname = $nickname;
37 $this->fixupTimestamps();
40 common_log_db_error($local, 'UPDATE', __FILE__);
41 // TRANS: Server exception thrown when updating a local group fails.
42 throw new ServerException(_('Could not update local group.'));