Skip to content

Commit

Permalink
bug #1216901, missing backquotes on the Browse feature in case of dup…
Browse files Browse the repository at this point in the history
…licate entry
  • Loading branch information
Marc Delisle committed Jun 8, 2005
1 parent ee99a97 commit ab21726
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ phpMyAdmin - Changelog
$Id$
$Source$

2005-06-08 Marc Delisle <lem9@users.sourceforge.net>
* libraries/common.lib.php: bug #1216901, missing backquotes on the Browse
feature in case of duplicate entry

2005-06-07 Marc Delisle <lem9@users.sourceforge.net>
* lang/tatarish*: updates, thanks to Albert Fazlí
* config.inc.php: bug #1215950, typo in comment
Expand Down
6 changes: 3 additions & 3 deletions libraries/common.lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -724,13 +724,13 @@ function PMA_mysqlDie($error_message = '', $the_query = '',
if (isset($mysql_error_values[0])) {
$tmp_fields = PMA_DBI_get_fields($db, $table, NULL);
foreach ($tmp_fields as $tmp_field) {
$duplicate_sql_query .= (($duplicate_sql_query!='') ? ' OR ' : '') . $tmp_field['Field'] . " LIKE '" . $mysql_error_values[0] . "'";
$duplicate_sql_query .= (($duplicate_sql_query!='') ? ' OR ' : '') . PMA_backquote($tmp_field['Field']) . " LIKE '" . $mysql_error_values[0] . "'";
}
}
if ($duplicate_sql_query!='') {
$duplicate_sql_query = "SELECT * FROM " . $table . " WHERE (" . $duplicate_sql_query . ")";
$duplicate_sql_query = "SELECT * FROM " . PMA_backquote($table) . " WHERE (" . $duplicate_sql_query . ")";
} else {
$duplicate_sql_query = "SELECT * FROM " . $table . "";
$duplicate_sql_query = "SELECT * FROM " . PMA_backquote($table) . "";
}
echo ' <form method="post" action="read_dump.php" style="padding: 0px; margin: 0px">' ."\n"
. ' <input type="hidden" name="sql_query" value="' . $duplicate_sql_query . '" />' . "\n"
Expand Down

0 comments on commit ab21726

Please sign in to comment.