From: mjollnir_ Date: Tue, 1 Feb 2005 00:28:02 +0000 (+0000) Subject: Fixing column_type for postgres (WHERE 0 is not valid so using LIMIT 0 instead) X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=d20f58e7e865ab32a789c966c3f309a54ea028ed;p=moodle.git Fixing column_type for postgres (WHERE 0 is not valid so using LIMIT 0 instead) --- diff --git a/lib/datalib.php b/lib/datalib.php index 1aa0e662af..292fbcb855 100644 --- a/lib/datalib.php +++ b/lib/datalib.php @@ -372,7 +372,7 @@ function table_column($table, $oldfield, $field, $type='integer', $size='10', function column_type($table, $column) { global $CFG, $db; - if(!$rs = $db->Execute('SELECT '.$column.' FROM '.$CFG->prefix.$table.' WHERE 0')) { + if(!$rs = $db->Execute('SELECT '.$column.' FROM '.$CFG->prefix.$table.' LIMIT 0')) { return false; }