Added get a total count records

Signed-off-by: Valentin Popov <info@valentineus.link>
This commit is contained in:
2019-05-09 20:35:59 +04:00
parent cb6d5c7e13
commit d441f44698
2 changed files with 42 additions and 0 deletions

View File

@ -187,6 +187,18 @@ final class api {
return $services;
}
/**
* Get a total count of existing records.
*
* @return int
* @throws \dml_exception
*/
public static function get_total_count(): int {
global $DB;
return $DB->count_records(LW_TABLE_SERVICES);
}
/**
* Update an existing record in the database.
*