]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-18577 drop enums support - step3: Fix oci8 adodb set_field_select() without select
authorstronk7 <stronk7>
Fri, 1 May 2009 23:35:01 +0000 (23:35 +0000)
committerstronk7 <stronk7>
Fri, 1 May 2009 23:35:01 +0000 (23:35 +0000)
lib/dml/oci8po_adodb_moodle_database.php

index 417561b78186d440704017c5f8d63dd7b8a1bb69..f37891b68831bb8e6ffe964bc888142a0ea888fb 100644 (file)
@@ -440,7 +440,8 @@ class oci8po_adodb_moodle_database extends adodb_moodle_database {
             $newfield = "$newfield = ?";
             array_unshift($params, $newvalue); // add as first param
         }
-        $sql = "UPDATE {$this->prefix}$table SET $newfield WHERE $select";
+        $select = !empty($select) ? "WHERE $select" : '';
+        $sql = "UPDATE {$this->prefix}$table SET $newfield $select";
 
         $this->query_start($sql, $params, SQL_QUERY_UPDATE);
         $rs = $rs = $this->adodb->Execute($sql, $params);