$path_to_root="..";
include_once($path_to_root . "/includes/session.inc");
-page(_("Software Upgrade"));
+page(_($help_context = "Software Upgrade"));
include_once($path_to_root . "/includes/date_functions.inc");
include_once($path_to_root . "/admin/db/company_db.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