query($sql); if (is_a($res, 'PEAR_Error')) return; $val = $res->fetchRow(); if ($val['id'] > 0) { $this->name = $val['name']; $this->id = $val['id']; if ($val['quota_percent']) $this->quota_percent = $val['quota_percent']; } } }