From 4400acd2fb8f05e44e785841ada2040b0f87b2a2 Mon Sep 17 00:00:00 2001 From: skodak Date: Tue, 9 Oct 2007 15:11:29 +0000 Subject: [PATCH] fixed yet more undefined $sqls --- lib/dmllib.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/dmllib.php b/lib/dmllib.php index add5003c60..3ed66e51f4 100644 --- a/lib/dmllib.php +++ b/lib/dmllib.php @@ -1274,7 +1274,8 @@ function set_field_select($table, $newfield, $newvalue, $select, $localcall = fa } /// Arriving here, standard update - $rs = $db->Execute('UPDATE '. $CFG->prefix . $table .' SET '.$update.' '.$select); + $sql = 'UPDATE '. $CFG->prefix . $table .' SET '.$update.' '.$select; + $rs = $db->Execute($sql); if (!$rs) { debugging($db->ErrorMsg() .'

'. $sql); if (!empty($CFG->dblogerror)) { @@ -1322,7 +1323,8 @@ function delete_records($table, $field1='', $value1='', $field2='', $value2='', $select = where_clause($field1, $value1, $field2, $value2, $field3, $value3); - $rs = $db->Execute('DELETE FROM '. $CFG->prefix . $table .' '. $select); + $sql = 'DELETE FROM '. $CFG->prefix . $table .' '. $select; + $rs = $db->Execute($sql); if (!$rs) { debugging($db->ErrorMsg() .'

'. $sql); if (!empty($CFG->dblogerror)) { @@ -2058,7 +2060,8 @@ function column_type($table, $column) { if (defined('MDL_PERFDB')) { global $PERF ; $PERF->dbqueries++; }; - if(!$rs = $db->Execute('SELECT '.$column.' FROM '.$CFG->prefix.$table.' WHERE 1=2')) { + $sql = 'SELECT '.$column.' FROM '.$CFG->prefix.$table.' WHERE 1=2'; + if(!$rs = $db->Execute($sql)) { debugging($db->ErrorMsg() .'

'. $sql); if (!empty($CFG->dblogerror)) { $debug=array_shift(debug_backtrace()); -- 2.39.5