public function updateClickCount($id, $clickCount = 0) { if (empty($clickCount)) { $record = parent::fetchByPk($id); $clickCount = $record["clickcount"]; } return parent::modify($id, array("clickcount" => $clickCount + 1)); }