diff --git a/versioned_docs/version-4.1/apis/core/dml/index.md b/versioned_docs/version-4.1/apis/core/dml/index.md index ee36872c3..d83e3efb2 100644 --- a/versioned_docs/version-4.1/apis/core/dml/index.md +++ b/versioned_docs/version-4.1/apis/core/dml/index.md @@ -95,7 +95,7 @@ $DB->get_record_sql( Some methods accept the $strictness parameter affecting the method behaviour. Supported modes are specified using the constants: -- MUST_EXIST - In this mode, the requested record must exist and must be unique. An exception will be thrown if no record is found or multiple matching records are found. +- MUST_EXIST - In this mode, the requested record must exist and must be unique. An exception `dml_missing_record_exception` will be thrown if no record is found or `dml_multiple_records_exception` if multiple matching records are found. - IGNORE_MISSING - In this mode, a missing record is not an error. False boolean is returned if the requested record is not found. If more records are found, a debugging message is displayed. - IGNORE_MULTIPLE - This is not a recommended mode. The function will silently ignore multiple records found and will return just the first one of them. @@ -648,7 +648,7 @@ try { // Assuming the both inserts work, we get to the following line. $transaction->allow_commit(); -} catch(Exception $e) { +} catch (Exception $e) { $transaction->rollback($e); } ``` @@ -873,7 +873,7 @@ public function sql_compare_text( ```php title="Example" $comparedescription = $DB->sql_compare_text('description'); -$comparedescription = $DB->sql_compare_text(':description'); +$comparedescriptionplaceholder = $DB->sql_compare_text(':description'); $todogroups = $DB->get_records_sql( "SELECT id FROM {group} WHERE {$comparedescription} = {$comparedescriptionplaceholder}", [ diff --git a/versioned_docs/version-4.3/apis/core/dml/index.md b/versioned_docs/version-4.3/apis/core/dml/index.md index ee36872c3..d83e3efb2 100644 --- a/versioned_docs/version-4.3/apis/core/dml/index.md +++ b/versioned_docs/version-4.3/apis/core/dml/index.md @@ -95,7 +95,7 @@ $DB->get_record_sql( Some methods accept the $strictness parameter affecting the method behaviour. Supported modes are specified using the constants: -- MUST_EXIST - In this mode, the requested record must exist and must be unique. An exception will be thrown if no record is found or multiple matching records are found. +- MUST_EXIST - In this mode, the requested record must exist and must be unique. An exception `dml_missing_record_exception` will be thrown if no record is found or `dml_multiple_records_exception` if multiple matching records are found. - IGNORE_MISSING - In this mode, a missing record is not an error. False boolean is returned if the requested record is not found. If more records are found, a debugging message is displayed. - IGNORE_MULTIPLE - This is not a recommended mode. The function will silently ignore multiple records found and will return just the first one of them. @@ -648,7 +648,7 @@ try { // Assuming the both inserts work, we get to the following line. $transaction->allow_commit(); -} catch(Exception $e) { +} catch (Exception $e) { $transaction->rollback($e); } ``` @@ -873,7 +873,7 @@ public function sql_compare_text( ```php title="Example" $comparedescription = $DB->sql_compare_text('description'); -$comparedescription = $DB->sql_compare_text(':description'); +$comparedescriptionplaceholder = $DB->sql_compare_text(':description'); $todogroups = $DB->get_records_sql( "SELECT id FROM {group} WHERE {$comparedescription} = {$comparedescriptionplaceholder}", [ diff --git a/versioned_docs/version-4.4/apis/core/dml/index.md b/versioned_docs/version-4.4/apis/core/dml/index.md index 3eda70b34..d83e3efb2 100644 --- a/versioned_docs/version-4.4/apis/core/dml/index.md +++ b/versioned_docs/version-4.4/apis/core/dml/index.md @@ -95,7 +95,7 @@ $DB->get_record_sql( Some methods accept the $strictness parameter affecting the method behaviour. Supported modes are specified using the constants: -- MUST_EXIST - In this mode, the requested record must exist and must be unique. An exception will be thrown if no record is found or multiple matching records are found. +- MUST_EXIST - In this mode, the requested record must exist and must be unique. An exception `dml_missing_record_exception` will be thrown if no record is found or `dml_multiple_records_exception` if multiple matching records are found. - IGNORE_MISSING - In this mode, a missing record is not an error. False boolean is returned if the requested record is not found. If more records are found, a debugging message is displayed. - IGNORE_MULTIPLE - This is not a recommended mode. The function will silently ignore multiple records found and will return just the first one of them. @@ -648,7 +648,7 @@ try { // Assuming the both inserts work, we get to the following line. $transaction->allow_commit(); -} catch(Exception $e) { +} catch (Exception $e) { $transaction->rollback($e); } ``` diff --git a/versioned_docs/version-4.5/apis/core/dml/index.md b/versioned_docs/version-4.5/apis/core/dml/index.md index 5a48f866a..d83e3efb2 100644 --- a/versioned_docs/version-4.5/apis/core/dml/index.md +++ b/versioned_docs/version-4.5/apis/core/dml/index.md @@ -648,7 +648,7 @@ try { // Assuming the both inserts work, we get to the following line. $transaction->allow_commit(); -} catch(Exception $e) { +} catch (Exception $e) { $transaction->rollback($e); } ```