The branch, master has been updated via cea5d8791ef776dc87961ae4f69c393acdffe381 (commit) via 624fdc8b2a62971abe3dc14a46132bc61356a888 (commit) via f66f8b7074679180790312f87c874fecda86b86e (commit) via e350eaeae71dcacc946e5686a526576103f5f32c (commit) from f0babc56a34afaf2664328a332e871c0116468d5 (commit)
- Log ----------------------------------------------------------------- commit cea5d8791ef776dc87961ae4f69c393acdffe381 Author: Michal Čihař michal@cihar.com Date: Fri Aug 19 09:17:21 2011 +0200
Use PMA_DBI_get_columns instead of custom query
commit 624fdc8b2a62971abe3dc14a46132bc61356a888 Author: Michal Čihař michal@cihar.com Date: Fri Aug 19 09:16:17 2011 +0200
Remove not used variable
commit f66f8b7074679180790312f87c874fecda86b86e Author: Michal Čihař michal@cihar.com Date: Fri Aug 19 09:14:54 2011 +0200
Use PMA_DBI_get_columns instead of custom query
commit e350eaeae71dcacc946e5686a526576103f5f32c Author: Michal Čihař michal@cihar.com Date: Fri Aug 19 09:13:21 2011 +0200
Use PMA_DBI_get_columns instead of custom query
-----------------------------------------------------------------------
Summary of changes: db_search.php | 7 +++---- libraries/schema/Pdf_Relation_Schema.class.php | 4 ++-- tbl_change.php | 3 +-- transformation_wrapper.php | 1 - 4 files changed, 6 insertions(+), 9 deletions(-)
diff --git a/db_search.php b/db_search.php index c0f2c08..6242a53 100644 --- a/db_search.php +++ b/db_search.php @@ -128,8 +128,7 @@ if (isset($_REQUEST['submit_search'])) { $sqlstr_delete = 'DELETE';
// Fields to select - $tblfields = PMA_DBI_fetch_result('SHOW FIELDS FROM ' . PMA_backquote($table) . ' FROM ' . PMA_backquote($GLOBALS['db']), - null, 'Field'); + $tblfields = PMA_DBI_get_columns($GLOBALS['db'], $table);
// Table to use $sqlstr_from = ' FROM ' . PMA_backquote($GLOBALS['db']) . '.' . PMA_backquote($table); @@ -148,8 +147,8 @@ if (isset($_REQUEST['submit_search'])) {
$thefieldlikevalue = array(); foreach ($tblfields as $tblfield) { - if (! isset($field) || strlen($field) == 0 || $tblfield == $field) { - $thefieldlikevalue[] = 'CONVERT(' . PMA_backquote($tblfield) . ' USING utf8)' + if (! isset($field) || strlen($field) == 0 || $tblfield['Field'] == $field) { + $thefieldlikevalue[] = 'CONVERT(' . PMA_backquote($tblfield['Field']) . ' USING utf8)' . ' ' . $like_or_regex . ' ' . "'" . $automatic_wildcard . $search_word diff --git a/libraries/schema/Pdf_Relation_Schema.class.php b/libraries/schema/Pdf_Relation_Schema.class.php index e74c14d..ed96efd 100644 --- a/libraries/schema/Pdf_Relation_Schema.class.php +++ b/libraries/schema/Pdf_Relation_Schema.class.php @@ -923,8 +923,8 @@ class PMA_Pdf_Relation_Schema extends PMA_Export_Relation_Schema $pdf->SetX(10); $pdf->Cell(0, 6, $i . ' ' . $table, 0, 1, 'L', 0, $pdf->PMA_links['doc'][$table]['-']); // $pdf->Ln(1); - $result = PMA_DBI_query('SHOW FIELDS FROM ' . PMA_backquote($table) . ';'); - while ($row = PMA_DBI_fetch_assoc($result)) { + $fields = PMA_DBI_get_columns($GLOBALS['db'], $table); + foreach($fields as $row) { $pdf->SetX(20); $field_name = $row['Field']; $pdf->PMA_links['doc'][$table][$field_name] = $pdf->AddLink(); diff --git a/tbl_change.php b/tbl_change.php index 5329f15..bf0704a 100644 --- a/tbl_change.php +++ b/tbl_change.php @@ -165,8 +165,7 @@ unset($show_create_table); * Get the list of the fields of the current table */ PMA_DBI_select_db($db); -$table_fields = PMA_DBI_fetch_result('SHOW FIELDS FROM ' . PMA_backquote($table) . ';', - null, null, null, PMA_DBI_QUERY_STORE); +$table_fields = PMA_DBI_get_columns($db, $table); $rows = array(); if (isset($where_clause)) { // when in edit mode load all selected rows from table diff --git a/transformation_wrapper.php b/transformation_wrapper.php index 577a435..1c5e16a 100644 --- a/transformation_wrapper.php +++ b/transformation_wrapper.php @@ -27,7 +27,6 @@ require_once './libraries/db_table_exists.lib.php'; * Get the list of the fields of the current table */ PMA_DBI_select_db($db); -$table_def = PMA_DBI_query('SHOW FIELDS FROM ' . PMA_backquote($table), null, PMA_DBI_QUERY_STORE); if (isset($where_clause)) { $result = PMA_DBI_query('SELECT * FROM ' . PMA_backquote($table) . ' WHERE ' . $where_clause . ';', null, PMA_DBI_QUERY_STORE); $row = PMA_DBI_fetch_assoc($result);
hooks/post-receive