]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-14679 removed all instances of column_type()
authorskodak <skodak>
Sun, 1 Jun 2008 16:09:27 +0000 (16:09 +0000)
committerskodak <skodak>
Sun, 1 Jun 2008 16:09:27 +0000 (16:09 +0000)
lib/dmllib.php
lib/dmllib_todo.php

index 13b9e9baeab7c20cc5eda2f879036ff896723a2a..71e7b34cdc032670a91f91acb42e2c4793503ccb 100644 (file)
@@ -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');
+}
index 6055abaef1672d06e1ceff7147990a48dfd4315f..352094918e8a2b2818c0c85fb3d9c637c4df2476 100644 (file)
@@ -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() .'<br /><br />'. 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