]> git.mjollnir.org Git - moodle.git/commitdiff
Fixing column_type for postgres (WHERE 0 is not valid so using LIMIT 0 instead)
authormjollnir_ <mjollnir_>
Tue, 1 Feb 2005 00:28:02 +0000 (00:28 +0000)
committermjollnir_ <mjollnir_>
Tue, 1 Feb 2005 00:28:02 +0000 (00:28 +0000)
lib/datalib.php

index 1aa0e662afffa635109e41bc569582c7a192473f..292fbcb85594da83dfc41aeb187a77cffed66309 100644 (file)
@@ -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;
     }