MDL-17408 DML: new sql_modulo() method for oracle

This commit is contained in:
skodak 2008-11-26 08:44:57 +00:00
parent e6df37346f
commit 415c4f78f3

View file

@ -173,6 +173,18 @@ class oci8po_adodb_moodle_database extends adodb_moodle_database {
return '((' . $int1 . ') # (' . $int2 . '))'; return '((' . $int1 . ') # (' . $int2 . '))';
} }
/**
* Returns the SQL text to be used in order to perform module '%'
* opration - remainder after division
*
* @param integer int1 first integer in the operation
* @param integer int2 second integer in the operation
* @return string the piece of SQL code to be used in your statement.
*/
public function sql_modulo($int1, $int2) {
return 'MOD(' . $int1 . ', ' . $int2 . ')';
}
function sql_null_from_clause() { function sql_null_from_clause() {
return ' FROM dual'; return ' FROM dual';
} }