]> git.mjollnir.org Git - moodle.git/commitdiff
sql_ilike() -- added notes on Oracle support or lack thereof
authormartinlanghoff <martinlanghoff>
Tue, 26 Sep 2006 05:07:28 +0000 (05:07 +0000)
committermartinlanghoff <martinlanghoff>
Tue, 26 Sep 2006 05:07:28 +0000 (05:07 +0000)
lib/dmllib.php

index bf0ad74cca9a56f0c699d35330ee02b79d3699bd..90392278107043799f7831105d5d1765161e639f 100644 (file)
@@ -1207,6 +1207,10 @@ function sql_paging_limit($page, $recordsperpage) {
 /**
  * Returns the proper SQL to do LIKE in a case-insensitive way
  *
+ * Note the LIKE are case sensitive for Oracle. Oracle 10g is required to use 
+ * the caseinsensitive search using regexp_like() or NLS_COMP=LINGUISTIC :-(
+ * See http://docs.moodle.org/en/XMLDB_Problems#Case-insensitive_searches
+ * 
  * @uses $CFG
  * @return string
  */
@@ -1214,10 +1218,10 @@ function sql_ilike() {
     global $CFG;
 
     switch ($CFG->dbtype) {
-        case 'mysql':
-             return 'LIKE';
-        default:
+        case 'postgres7':
              return 'ILIKE';
+        default:
+             return 'LIKE';
     }
 }