diff options
author | Alexander M. Turek <me@derrabus.de> | 2004-01-22 05:13:48 +0300 |
---|---|---|
committer | Alexander M. Turek <me@derrabus.de> | 2004-01-22 05:13:48 +0300 |
commit | 2915b5c3cea54b55d85f1b15029808480952b87d (patch) | |
tree | 289cfde62b3cbb8e748d006e322c5ab0ae26db32 /tbl_printview.php | |
parent | 597dca0f1b229b56efb9d9fe1398c6745f4d3c58 (diff) |
Added MySQLi library; Removed calls to old mysql_wrappers library.
Diffstat (limited to 'tbl_printview.php')
-rw-r--r-- | tbl_printview.php | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/tbl_printview.php b/tbl_printview.php index e9684c3a18..9ddac745c7 100644 --- a/tbl_printview.php +++ b/tbl_printview.php @@ -38,7 +38,7 @@ if (isset($table)) { /** * Selects the database */ -PMA_mysql_select_db($db); +PMA_DBI_select_db($db); /** @@ -79,21 +79,17 @@ foreach($the_tables AS $key => $table) { /** * Gets table informations */ - $local_query = 'SHOW TABLE STATUS LIKE \'' . PMA_sqlAddslashes($table, TRUE) . '\''; - $result = PMA_mysql_query($local_query) or PMA_mysqlDie('', $local_query, '', $err_url); - $showtable = PMA_mysql_fetch_array($result); + $result = PMA_DBI_query('SHOW TABLE STATUS LIKE \'' . PMA_sqlAddslashes($table, TRUE) . '\';'); + $showtable = PMA_DBI_fetch_assoc($result); $num_rows = (isset($showtable['Rows']) ? $showtable['Rows'] : 0); $show_comment = (isset($showtable['Comment']) ? $showtable['Comment'] : ''); - if ($result) { - PMA_DBI_free_result($result); - } + PMA_DBI_free_result($result); /** * Gets table keys and retains them */ - $local_query = 'SHOW KEYS FROM ' . PMA_backquote($table); - $result = PMA_mysql_query($local_query) or PMA_mysqlDie('', $local_query, '', $err_url); + $result = PMA_DBI_query('SHOW KEYS FROM ' . PMA_backquote($table) . ';'); $primary = ''; $indexes = array(); $lastIndex = ''; @@ -101,7 +97,7 @@ foreach($the_tables AS $key => $table) { $indexes_data = array(); $pk_array = array(); // will be use to emphasis prim. keys in the table // view - while ($row = PMA_mysql_fetch_array($result)) { + while ($row = PMA_DBI_fetch_assoc($result)) { // Backups the list of primary keys if ($row['Key_name'] == 'PRIMARY') { $primary .= $row['Column_name'] . ', '; @@ -135,8 +131,7 @@ foreach($the_tables AS $key => $table) { /** * Gets fields properties */ - $local_query = 'SHOW FIELDS FROM ' . PMA_backquote($table); - $result = PMA_mysql_query($local_query) or PMA_mysqlDie('', $local_query, '', $err_url); + $result = PMA_DBI_query('SHOW FIELDS FROM ' . PMA_backquote($table) . ';'); $fields_cnt = PMA_DBI_num_rows($result); // Check if we can use Relations (Mike Beck) @@ -193,7 +188,7 @@ foreach($the_tables AS $key => $table) { <?php $i = 0; - while ($row = PMA_mysql_fetch_array($result)) { + while ($row = PMA_DBI_fetch_assoc($result)) { $bgcolor = ($i % 2) ?$cfg['BgcolorOne'] : $cfg['BgcolorTwo']; $i++; |