use PMA_DBI function
This commit is contained in:
@@ -592,7 +592,7 @@ function PMA_safe_db_list($only_db_check, $dbh, $dblist_cnt, $rs, $userlink, $cf
|
||||
if (!$dblist_cnt
|
||||
&& ($rs && @PMA_DBI_num_rows($rs))) {
|
||||
$row = PMA_mysql_fetch_array($rs);
|
||||
mysql_free_result($rs);
|
||||
PMA_DBI_free_result($rs);
|
||||
// Correction uva 19991215
|
||||
// Previous code assumed database "mysql" admin table "db" column
|
||||
// "db" contains literal name of user database, and works if so.
|
||||
@@ -631,7 +631,7 @@ function PMA_safe_db_list($only_db_check, $dbh, $dblist_cnt, $rs, $userlink, $cf
|
||||
$uva_mydbs[$row['Db']] = 1;
|
||||
}
|
||||
} // end while
|
||||
mysql_free_result($rs);
|
||||
PMA_DBI_free_result($rs);
|
||||
$uva_alldbs = mysql_list_dbs($GLOBALS['dbh']);
|
||||
// loic1: all databases cases - part 2
|
||||
if (isset($uva_mydbs['%'])) {
|
||||
@@ -662,7 +662,7 @@ function PMA_safe_db_list($only_db_check, $dbh, $dblist_cnt, $rs, $userlink, $cf
|
||||
} // end if ... else if....
|
||||
} // end while
|
||||
} // end else
|
||||
mysql_free_result($uva_alldbs);
|
||||
PMA_DBI_free_result($uva_alldbs);
|
||||
unset($uva_mydbs);
|
||||
} // end if
|
||||
|
||||
@@ -675,7 +675,7 @@ function PMA_safe_db_list($only_db_check, $dbh, $dblist_cnt, $rs, $userlink, $cf
|
||||
$dblist[] = $row['Db'];
|
||||
}
|
||||
} // end while
|
||||
mysql_free_result($rs);
|
||||
PMA_DBI_free_result($rs);
|
||||
} // end if
|
||||
} // end if
|
||||
} // end building available dbs from the "mysql" db
|
||||
@@ -1059,7 +1059,7 @@ if ($is_minimum_common == FALSE) {
|
||||
$true_dblist[] = $row[0];
|
||||
} // end while
|
||||
if ($rs) {
|
||||
mysql_free_result($rs);
|
||||
PMA_DBI_free_result($rs);
|
||||
}
|
||||
} else {
|
||||
$true_dblist[] = str_replace('\\_', '_', str_replace('\\%', '%', $dblist[$i]));
|
||||
@@ -1252,12 +1252,12 @@ if ($is_minimum_common == FALSE) {
|
||||
if ($num < $cfg['MaxExactCount']) {
|
||||
unset($num);
|
||||
}
|
||||
mysql_free_result($result);
|
||||
PMA_DBI_free_result($result);
|
||||
|
||||
if (!isset($num)) {
|
||||
$result = PMA_mysql_query('SELECT COUNT(*) AS num FROM ' . PMA_backquote($db) . '.' . PMA_backquote($table)) or PMA_mysqlDie('', $local_query, '', $err_url);
|
||||
$num = ($result) ? PMA_mysql_result($result, 0, 'num') : 0;
|
||||
mysql_free_result($result);
|
||||
PMA_DBI_free_result($result);
|
||||
}
|
||||
if ($ret) {
|
||||
return $num;
|
||||
@@ -1309,7 +1309,7 @@ if (typeof(window.parent) != 'undefined'
|
||||
? ''
|
||||
: $tbl_status['Comment'] . ' ';
|
||||
$tooltip .= '(' . $tbl_status['Rows'] . ' ' . $GLOBALS['strRows'] . ')';
|
||||
mysql_free_result($result);
|
||||
PMA_DBI_free_result($result);
|
||||
$md5_tbl = md5($GLOBALS['table']);
|
||||
echo "\n";
|
||||
?>
|
||||
@@ -1336,7 +1336,7 @@ if (typeof(document.getElementById) != 'undefined'
|
||||
$result = @PMA_mysql_query('SHOW TABLE STATUS FROM ' . PMA_backquote($GLOBALS['db']) . ' LIKE \'' . PMA_sqlAddslashes($GLOBALS['table'], TRUE) . '\'');
|
||||
if ($result) {
|
||||
$tbl_status = PMA_mysql_fetch_array($result, MYSQL_ASSOC);
|
||||
mysql_free_result($result);
|
||||
PMA_DBI_free_result($result);
|
||||
}
|
||||
}
|
||||
if (isset($tbl_status) && (int) $tbl_status['Index_length'] > 1024) {
|
||||
|
@@ -31,7 +31,7 @@ if (!isset($is_table) || !$is_table) {
|
||||
}
|
||||
exit;
|
||||
} else if (isset($is_table)) {
|
||||
mysql_free_result($is_table);
|
||||
PMA_DBI_free_result($is_table);
|
||||
}
|
||||
} // end if (ensures table exists)
|
||||
?>
|
||||
|
@@ -163,7 +163,7 @@ function PMA_exportData($db, $table, $crlf, $error_url, $sql_query) {
|
||||
} // end for
|
||||
if (!PMA_exportOutputHandler($schema_insert . $add_character)) return FALSE;
|
||||
} // end while
|
||||
mysql_free_result($result);
|
||||
PMA_DBI_free_result($result);
|
||||
|
||||
return TRUE;
|
||||
} // end of the 'PMA_getTableCsv()' function
|
||||
|
@@ -184,7 +184,7 @@ function PMA_exportData($db, $table, $crlf, $error_url, $sql_query) {
|
||||
$buffer = ' \\end{longtable}' . $crlf;
|
||||
if (!PMA_exportOutputHandler($buffer)) return FALSE;
|
||||
|
||||
mysql_free_result($result);
|
||||
PMA_DBI_free_result($result);
|
||||
return TRUE;
|
||||
|
||||
} // end getTableLaTeX
|
||||
@@ -378,7 +378,7 @@ function PMA_exportStructure($db, $table, $crlf, $error_url, $do_relation = fals
|
||||
|
||||
if (!PMA_exportOutputHandler($buffer)) return FALSE;
|
||||
} // end while
|
||||
mysql_free_result($result);
|
||||
PMA_DBI_free_result($result);
|
||||
|
||||
$buffer = ' \\end{longtable}' . $crlf;
|
||||
return PMA_exportOutputHandler($buffer);
|
||||
|
@@ -176,7 +176,7 @@ function PMA_getTableDef($db, $table, $crlf, $error_url, $show_dates = false)
|
||||
$schema_create .= '# ' . $GLOBALS['strStatCheckTime'] . ': ' . PMA_localisedDate(strtotime($tmpres['Check_time'])) . $crlf;
|
||||
$new_crlf = '#' . $crlf . $crlf;
|
||||
}
|
||||
mysql_free_result($result);
|
||||
PMA_DBI_free_result($result);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -243,7 +243,7 @@ function PMA_getTableDef($db, $table, $crlf, $error_url, $show_dates = false)
|
||||
$schema_create .= $auto_increment;
|
||||
|
||||
|
||||
mysql_free_result($result);
|
||||
PMA_DBI_free_result($result);
|
||||
return $schema_create;
|
||||
} // end of the 'PMA_getTableDef()' function
|
||||
|
||||
@@ -521,7 +521,7 @@ function PMA_exportData($db, $table, $crlf, $error_url, $sql_query)
|
||||
|
||||
} // end while
|
||||
} // end if ($result != FALSE)
|
||||
mysql_free_result($result);
|
||||
PMA_DBI_free_result($result);
|
||||
|
||||
return TRUE;
|
||||
} // end of the 'PMA_exportData()' function
|
||||
|
@@ -137,7 +137,7 @@ function PMA_exportData($db, $table, $crlf, $error_url, $sql_query) {
|
||||
|
||||
if (!PMA_exportOutputHandler($buffer)) return FALSE;
|
||||
}
|
||||
mysql_free_result($result);
|
||||
PMA_DBI_free_result($result);
|
||||
|
||||
return TRUE;
|
||||
} // end of the 'PMA_getTableXML()' function
|
||||
|
@@ -13,7 +13,7 @@ if (PMA_MYSQL_INT_VERSION >= 40100){
|
||||
$mysql_charsets_maxlen[$row['Charset']] = $row['Maxlen'];
|
||||
$mysql_charsets_descriptions[$row['Charset']] = $row['Description'];
|
||||
}
|
||||
@mysql_free_result($res);
|
||||
@PMA_DBI_free_result($res);
|
||||
unset($res, $row);
|
||||
|
||||
$res = PMA_mysql_query('SHOW COLLATION;', $userlink)
|
||||
@@ -43,7 +43,7 @@ if (PMA_MYSQL_INT_VERSION >= 40100){
|
||||
reset($mysql_collations[$key]);
|
||||
}
|
||||
|
||||
@mysql_free_result($res);
|
||||
@PMA_DBI_free_result($res);
|
||||
unset($res, $row);
|
||||
|
||||
function PMA_getCollationDescr($collation) {
|
||||
@@ -236,7 +236,7 @@ if (PMA_MYSQL_INT_VERSION >= 40100){
|
||||
$sql_query = 'SHOW CREATE DATABASE `' . $db . '`;';
|
||||
$res = PMA_mysql_query($sql_query, $userlink) or PMA_mysqlDie(PMA_mysql_error($userlink), $sql_query);
|
||||
$row = PMA_mysql_fetch_row($res);
|
||||
mysql_free_result($res);
|
||||
PMA_DBI_free_result($res);
|
||||
$tokenized = explode(' ', $row[1]);
|
||||
unset($row, $res, $sql_query);
|
||||
|
||||
|
@@ -185,7 +185,7 @@ function PMA_getRelationsParam($verbose = FALSE)
|
||||
$cfgRelation['allworks'] = TRUE;
|
||||
}
|
||||
if ($tab_rs) {
|
||||
mysql_free_result($tab_rs);
|
||||
PMA_DBI_free_result($tab_rs);
|
||||
} else {
|
||||
$cfg['Server']['pmadb'] = FALSE;
|
||||
}
|
||||
|
Reference in New Issue
Block a user