where($where)->find(); if (!$info) { return $this->save($data); //insert } else { $this->save($data, $where); //update return true; } } }