-
Improvement
-
Resolution: Fixed
-
Major
-
2.0
-
None
-
MOODLE_20_STABLE
-
MOODLE_20_STABLE
there are very many palces in code like:
if (!$record = $DB->ger_record('table', $conditions)) {
print_error('geenralproblem');
}
it is usually 66% of wasted lines and one extra language string with information that does not help with real problem solution anyway
I am proposing to add new method to moodle_database clas
function get_existing_record($tablename, array $conditions, $errorstring='', $errorcode='', $module='');
This method would work like get_record() but it would throw new exception.
Eloy is strongly opposing this because there is nothing like this in standard SQL. Time to vote