diff --git a/ldi_table.php b/ldi_table.php index 3d29b855c..3d3a6e08c 100644 --- a/ldi_table.php +++ b/ldi_table.php @@ -160,7 +160,7 @@ if (PMA_MYSQL_INT_VERSION > 40003) { $local_option_selected = TRUE; } } - mysql_free_result($result); + PMA_DBI_free_result($result); } ?> diff --git a/left.php b/left.php index 2b6208158..ff1d86f53 100644 --- a/left.php +++ b/left.php @@ -785,10 +785,10 @@ echo "\n"; * Close MySql connections */ if (isset($dbh) && $dbh) { - @mysql_close($dbh); + @PMA_DBI_close($dbh); } if (isset($userlink) && $userlink) { - @mysql_close($userlink); + @PMA_DBI_close($userlink); } diff --git a/libraries/common.lib.php b/libraries/common.lib.php index d0c568406..8067f3454 100644 --- a/libraries/common.lib.php +++ b/libraries/common.lib.php @@ -590,7 +590,7 @@ function PMA_safe_db_list($only_db_check, $dbh, $dblist_cnt, $rs, $userlink, $cf // Access to "mysql" db allowed and dblist still empty -> gets the // usable db list if (!$dblist_cnt - && ($rs && @mysql_numrows($rs))) { + && ($rs && @PMA_DBI_num_rows($rs))) { $row = PMA_mysql_fetch_array($rs); mysql_free_result($rs); // Correction uva 19991215 @@ -609,7 +609,7 @@ function PMA_safe_db_list($only_db_check, $dbh, $dblist_cnt, $rs, $userlink, $cf // lem9: User can be blank (anonymous user) $local_query = 'SELECT DISTINCT Db FROM mysql.db WHERE Select_priv = \'Y\' AND (User = \'' . PMA_sqlAddslashes($cfg['Server']['user']) . '\' OR User = \'\')'; $rs = PMA_mysql_query($local_query, $dbh); // Debug: or PMA_mysqlDie('', $local_query, FALSE); - if ($rs && @mysql_numrows($rs)) { + if ($rs && @PMA_DBI_num_rows($rs)) { // Will use as associative array of the following 2 code // lines: // the 1st is the only line intact from before @@ -669,7 +669,7 @@ function PMA_safe_db_list($only_db_check, $dbh, $dblist_cnt, $rs, $userlink, $cf // 2. get allowed dbs from the "mysql.tables_priv" table $local_query = 'SELECT DISTINCT Db FROM mysql.tables_priv WHERE Table_priv LIKE \'%Select%\' AND User = \'' . PMA_sqlAddslashes($cfg['Server']['user']) . '\''; $rs = PMA_mysql_query($local_query, $dbh); // Debug: or PMA_mysqlDie('', $local_query, FALSE); - if ($rs && @mysql_numrows($rs)) { + if ($rs && @PMA_DBI_num_rows($rs)) { while ($row = PMA_mysql_fetch_array($rs)) { if (PMA_isInto($row['Db'], $dblist) == -1) { $dblist[] = $row['Db']; diff --git a/libraries/db_table_exists.lib.php b/libraries/db_table_exists.lib.php index 79edcdffa..e201ad986 100644 --- a/libraries/db_table_exists.lib.php +++ b/libraries/db_table_exists.lib.php @@ -25,7 +25,7 @@ if (!isset($is_table) || !$is_table) { $is_table = @PMA_mysql_query('SHOW TABLES LIKE \'' . PMA_sqlAddslashes($table, TRUE) . '\''); } if (empty($table) - || !($is_table && @mysql_numrows($is_table))) { + || !($is_table && @PMA_DBI_num_rows($is_table))) { if (!isset($is_transformation_wrapper)) { header('Location: ' . $cfg['PmaAbsoluteUri'] . 'db_details.php?' . PMA_generate_common_url($db, '', '&') . (isset($message) ? '&message=' . urlencode($message) : '') . '&reload=1'); } diff --git a/pdf_pages.php b/pdf_pages.php index 5818f76f9..e7ff08d54 100644 --- a/pdf_pages.php +++ b/pdf_pages.php @@ -330,7 +330,7 @@ foreach($array_sh_page AS $key => $temp_sh_page) { echo "
".htmlspecialchars($row['Field'])."\n"; } echo '' . "\n"; - mysql_free_result($fields_rs); + PMA_DBI_free_result($fields_rs); $i++; } diff --git a/pdf_schema.php b/pdf_schema.php index 092de2a70..f56b1e54c 100644 --- a/pdf_schema.php +++ b/pdf_schema.php @@ -1283,7 +1283,7 @@ function PMA_RT_DOC($alltables ){ $check_time = (isset($showtable['Check_time']) ? PMA_localisedDate(strtotime($showtable['Check_time'])) : ''); if ($result) { - mysql_free_result($result); + PMA_DBI_free_result($result); } @@ -1326,7 +1326,7 @@ function PMA_RT_DOC($alltables ){ } // end while if ($result) { - mysql_free_result($result); + PMA_DBI_free_result($result); } @@ -1498,7 +1498,7 @@ function PMA_RT_DOC($alltables ){ } */ } // end while $pdf->SetFont('', '',14); - mysql_free_result($result); + PMA_DBI_free_result($result); }//end each diff --git a/queryframe.php b/queryframe.php index d3f5d2fc0..4f94ae7b9 100644 --- a/queryframe.php +++ b/queryframe.php @@ -115,10 +115,10 @@ document.writeln(' ''); } @@ -192,7 +192,7 @@ function PMA_displayPrivTable($db = '*', $table = '*', $submit = TRUE, $indent = $res = PMA_mysql_query($sql_query, $userlink) or PMA_mysqlDie(PMA_mysql_error($userlink), $sql_query); unset($sql_query); $row1 = PMA_mysql_fetch_array($res, MYSQL_ASSOC); - mysql_free_result($res); + PMA_DBI_free_result($res); $av_grants = explode ('\',\'' , substr($row1['Type'], strpos($row1['Type'], '(') + 2, strpos($row1['Type'], ')') - strpos($row1['Type'], '(') - 3)); unset($row1); $users_grants = explode(',', $row['Table_priv']); @@ -213,7 +213,7 @@ function PMA_displayPrivTable($db = '*', $table = '*', $submit = TRUE, $indent = 'References' => FALSE ); } - mysql_free_result($res); + PMA_DBI_free_result($res); unset($res); unset($row1); } @@ -227,7 +227,7 @@ function PMA_displayPrivTable($db = '*', $table = '*', $submit = TRUE, $indent = $columns[$row1[0]][$current] = TRUE; } } - mysql_free_result($res); + PMA_DBI_free_result($res); unset($res); unset($row1); unset($current); @@ -489,7 +489,7 @@ function PMA_displayLoginInformationFields($mode = 'new', $indent = 0) . $spaces . '