]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-17491 oracle dml: towards full support
authorskodak <skodak>
Tue, 9 Dec 2008 22:24:07 +0000 (22:24 +0000)
committerskodak <skodak>
Tue, 9 Dec 2008 22:24:07 +0000 (22:24 +0000)
lib/dml/oci8po_adodb_moodle_database.php
lib/dml/oci_native_moodle_database.php

index ab7c084da5df3449d5fbde81d8a07d0f1265b658..417561b78186d440704017c5f8d63dd7b8a1bb69 100644 (file)
@@ -170,7 +170,7 @@ class oci8po_adodb_moodle_database extends adodb_moodle_database {
     }
 
     public function sql_bitxor($int1, $int2) {
-        return '((' . $int1 . ') # (' . $int2 . '))';
+        return '(' . $this->sql_bitor($int1, $int2) . ' - ' . $this->sql_bitand($int1, $int2) . ')';
     }
 
     /**
index 8c0538ce3014d10797cd0f29ab020a5d4cef2948..8291877f6504f7c2df59ab31e246c03ceeb77350 100644 (file)
@@ -1118,13 +1118,11 @@ class oci_native_moodle_database extends moodle_database {
     }
 
     public function sql_bitor($int1, $int2) {
-        // TODO: this can not work because the number of params does not match
         return '((' . $int1 . ') + (' . $int2 . ') - ' . $this->sql_bitand($int1, $int2) . ')';
     }
 
     public function sql_bitxor($int1, $int2) {
-        // TODO: this can not work because the number of params does not match
-        return '(' . sql_bitor($int1, $int2) . ' - ' . $this->sql_bitand($int1, $int2) . ')';
+        return '(' . $this->sql_bitor($int1, $int2) . ' - ' . $this->sql_bitand($int1, $int2) . ')';
     }
 
     /**