unquoted identifiers
This commit is contained in:
@@ -5,6 +5,9 @@ phpMyAdmin - Changelog
|
||||
$Id$
|
||||
$Source$
|
||||
|
||||
2002-11-13 Marc Delisle <lem9@users.sourceforge.net>
|
||||
* libraries/sqlparser.lib.php3: bug 636575 (unquoted identifiers)
|
||||
|
||||
2002-11-11 Alexander M. Turek <rabus@users.sourceforge.net>
|
||||
* libaries/common.lib.php3: Fixed bug #636345 (Error when modifying table
|
||||
keys).
|
||||
|
@@ -703,23 +703,24 @@ if (!defined('PMA_SQP_LIB_INCLUDED')) {
|
||||
|| ($arr[$i]['type'] == 'quote_single')
|
||||
|| ($arr[$i]['type'] == 'alpha_identifier')) {
|
||||
|
||||
switch ($arr[$i]['type']) {
|
||||
case 'alpha_identifier':
|
||||
$identifier = $arr[$i]['data'];
|
||||
break;
|
||||
|
||||
//TODO: check embedded double quotes or backticks?
|
||||
// and/or remove just the first and last character?
|
||||
if ($arr[$i]['type'] == 'quote_backtick') {
|
||||
// remove backticks
|
||||
$identifier = str_replace('`','',$arr[$i]['data']);
|
||||
}
|
||||
|
||||
if ($arr[$i]['type'] == 'quote_double') {
|
||||
// remove double quotes
|
||||
$identifier = str_replace('"','',$arr[$i]['data']);
|
||||
}
|
||||
|
||||
if ($arr[$i]['type'] == 'quote_single') {
|
||||
// remove single quotes
|
||||
$identifier = str_replace("'","",$arr[$i]['data']);
|
||||
}
|
||||
|
||||
case 'quote_backtick':
|
||||
$identifier = str_replace('`','',$arr[$i]['data']);
|
||||
break;
|
||||
case 'quote_double':
|
||||
$identifier = str_replace('"','',$arr[$i]['data']);
|
||||
break;
|
||||
case 'quote_single':
|
||||
$identifier = str_replace("'","",$arr[$i]['data']);
|
||||
break;
|
||||
} // end switch
|
||||
|
||||
if ($subresult['querytype'] == 'SELECT') {
|
||||
if (!$seen_from) {
|
||||
if ($previous_was_identifier) {
|
||||
|
Reference in New Issue
Block a user