From e9b13bdddcfc949ab141521942352b20e591559c Mon Sep 17 00:00:00 2001 From: skodak Date: Sun, 1 Jun 2008 16:09:27 +0000 Subject: [PATCH] MDL-14679 removed all instances of column_type() --- lib/dmllib.php | 4 ++++ lib/dmllib_todo.php | 29 ----------------------------- 2 files changed, 4 insertions(+), 29 deletions(-) diff --git a/lib/dmllib.php b/lib/dmllib.php index 13b9e9baea..71e7b34cdc 100644 --- a/lib/dmllib.php +++ b/lib/dmllib.php @@ -439,3 +439,7 @@ function get_records_select_menu($table, $select='', $sort='', $fields='*', $lim function get_records_sql_menu($sql, $limitfrom='', $limitnum='') { error('get_records_sql_menu() removed'); } + +function column_type($table, $column) { + error('column_type() removed'); +} diff --git a/lib/dmllib_todo.php b/lib/dmllib_todo.php index 6055abaef1..352094918e 100644 --- a/lib/dmllib_todo.php +++ b/lib/dmllib_todo.php @@ -889,35 +889,6 @@ function delete_records_select($table, $select='') { return $rs; } -/** - * Get the data type of a table column, using an ADOdb MetaType() call. - * - * @uses $CFG - * @uses $db - * @param string $table The name of the database table - * @param string $column The name of the field in the table - * @return string Field type or false if error - */ - -function column_type($table, $column) { - global $CFG, $db; - - if (defined('MDL_PERFDB')) { global $PERF ; $PERF->dbqueries++; }; - - $sql = 'SELECT '.$column.' FROM '.$CFG->prefix.$table.' WHERE 1=2'; - if(!$rs = $db->Execute($sql)) { - debugging($db->ErrorMsg() .'

'. s($sql)); - if (!empty($CFG->dblogerror)) { - $debug=array_shift(debug_backtrace()); - error_log("SQL ".$db->ErrorMsg()." in {$debug['file']} on line {$debug['line']}. STATEMENT: $sql"); - } - return false; - } - - $field = $rs->FetchField(0); - return $rs->MetaType($field->type); -} - /** * This function will handle all the records before being inserted/updated to DB for Oracle * installations. This is because the "special feature" of Oracle where the empty string is -- 2.39.5