public function first_row($type = 'object') { $result = $this->result($type); return count($result) === 0 ? NULL : $result[0]; }