Update table in raw sql returning value on success

Hello, I write the code below to update a value on a table using raw sql, but I like to get a value like 1 or true on update success instead of a resultset because there's none. How can I do this? ```php public static function toggleAccess($UsrCod, $UsAtCod) { $sql = "UPDATE userattachment SET userattachment.UsAAccess = IF(userattachment.UsAAccess = 'public', 'private', 'public') WHERE userattachment.UsrCod = " . $UsrCod . " AND userattachment.UsAtCod = " . $UsAtCod . ";"; // Base model $userattachment = new UserAttachment();

// Execute the query
return new Resultset(null, $user_attachment, $user_attachment->getReadConnection()->query($sql));

} ```


$this->getDi()->get("db")->execute($sql); // returning boolean