X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=admin%2Finst_upgrade.php;h=aa0d28388d35fad0459fb12a2277725ed2512c0d;hb=45a035785b9a820621da56dec93078b3ccd9832e;hp=ecfc5b899d821e2cbaa513d75fd31dac47f3dab2;hpb=676c52e955fba6ea4095816a44233404d73f90ce;p=fa-stable.git diff --git a/admin/inst_upgrade.php b/admin/inst_upgrade.php index ecfc5b89..aa0d2838 100644 --- a/admin/inst_upgrade.php +++ b/admin/inst_upgrade.php @@ -29,10 +29,11 @@ include_once($path_to_root . "/includes/ui.inc"); // function check_table($pref, $table, $field=null, $properties=null) { - $fields = @db_query("SHOW COLUMNS FROM ".$pref.$table); - if (!$fields) + $tables = @db_query("SHOW TABLES LIKE '".$pref.$table."'"); + if (!db_num_rows($tables)) return 1; // no such table or error + $fields = @db_query("SHOW COLUMNS FROM ".$pref.$table); if (!isset($field)) return 0; // table exists