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