mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 14:27:22 +01:00
Adding new sql_null_from_clause() helper function from 19_STABLE. MDL-13861
This commit is contained in:
parent
5e581dd487
commit
f3700f8cb3
@ -1199,6 +1199,15 @@ abstract class moodle_database {
|
||||
return '((' . $int1 . ') ^ (' . $int2 . '))';
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the FROM clause required by some DBs in all SELECT statements
|
||||
* To be used in queries not having FROM clause to provide cross_db
|
||||
* Most DBs don't need it, hence the default is ''
|
||||
*/
|
||||
public function sql_null_from_clause() {
|
||||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the SQL to be used in order to CAST one CHAR column to INTEGER.
|
||||
*
|
||||
|
@ -166,6 +166,10 @@ class oci8po_adodb_moodle_database extends adodb_moodle_database {
|
||||
return '((' . $int1 . ') # (' . $int2 . '))';
|
||||
}
|
||||
|
||||
function sql_null_from_clause() {
|
||||
return ' FROM dual';
|
||||
}
|
||||
|
||||
public function sql_cast_char2int($fieldname, $text=false) {
|
||||
if (!$text) {
|
||||
return ' CAST(' . $fieldname . ' AS INT) ';
|
||||
|
Loading…
x
Reference in New Issue
Block a user