Merged from MOODLE_15_STABLE - Long-pending rollback_sql()

This commit is contained in:
martinlanghoff
2005-08-26 04:02:06 +00:00
parent 16a07a1e6b
commit c54a59435c
+14
View File
@@ -86,6 +86,20 @@ function begin_sql() {
}
return true;
}
/**
* on DBs that support it, commit the transaction
*/
function rollback_sql() {
/// Completely general function - it just runs some SQL and reports success.
global $CFG;
if ($CFG->dbtype === 'postgres7') {
return execute_sql('ROLLBACK', false);
}
return true;
}
/**
* returns db specific uppercase function