WHERE tab.relname = typ.typname AND typ.typrelid = f.attrelid
AND f.attrelid = a.adrelid AND f.attname = '$field_name'
AND $tableWhere AND f.attnum = a.adnum");
- $row = @pg_fetch_row($result, 0);
- $num = preg_replace("/'(.*)'::\w+/", "\\1", $row[0]);
- $flags .= 'default_' . rawurlencode($num) . ' ';
+ if ($result && @pg_numrows($result) > 0 ) {
+ $row = @pg_fetch_row($result, 0);
+ $num = preg_replace("/'(.*)'::\w+/", "\\1", $row[0]);
+ $flags .= 'default_' . rawurlencode($num) . ' ';
+ }
}
} else {
$flags = '';
Please check the value given to HTML_FlexyFramework, or run with debug on!<BR>
<BR> ".$err->toString());
}
- $res = $err->query("SELECT @@global.read_only as ro");
+ // only applies to mysql...
- $row = is_a($res, 'DB_Error') ? false : $res->fetchRow(DB_FETCHMODE_ASSOC);
- if (!$row || (!empty($row['ro']) && empty($options['skip-read-only-check']))) {
- $this->fatalError("Database is configured to be read-only - please check database<BR> ".$err->toString());
+ if (preg_match('/^mysql/', $this->database)) {
+ $res = $err->query("SELECT @@global.read_only as ro");
+
+ $row = is_a($res, 'DB_Error') ? false : $res->fetchRow(DB_FETCHMODE_ASSOC);
+ if (!$row || (!empty($row['ro']) && empty($options['skip-read-only-check']))) {
+ $this->fatalError("Database is configured to be read-only - please check database<BR> ".$err->toString());
+ }
}
// reset dont die!
$options['dont_die'] = $dd ;