single quotes bug

This commit is contained in:
Marc Delisle
2002-11-11 20:08:02 +00:00
parent a20e878508
commit b8a852d6ac
2 changed files with 8 additions and 1 deletions

View File

@@ -700,6 +700,7 @@ if (!defined('PMA_SQP_LIB_INCLUDED')) {
// ==============================
if (($arr[$i]['type'] == 'quote_backtick')
|| ($arr[$i]['type'] == 'quote_double')
|| ($arr[$i]['type'] == 'quote_single')
|| ($arr[$i]['type'] == 'alpha_identifier')) {
//TODO: check embedded double quotes or backticks?
@@ -714,6 +715,11 @@ if (!defined('PMA_SQP_LIB_INCLUDED')) {
$identifier = str_replace('"','',$arr[$i]['data']);
}
if ($arr[$i]['type'] == 'quote_single') {
// remove single quotes
$identifier = str_replace("'","",$arr[$i]['data']);
}
if ($subresult['querytype'] == 'SELECT') {
if (!$seen_from) {
if ($previous_was_identifier) {
@@ -884,6 +890,7 @@ if (!defined('PMA_SQP_LIB_INCLUDED')) {
// token is not an identifier
if (($arr[$i]['type'] != 'alpha_identifier')
&& ($arr[$i]['type'] != 'quote_double')
&& ($arr[$i]['type'] != 'quote_single')
&& ($arr[$i]['type'] != 'quote_backtick')) {
$previous_was_identifier = FALSE;
} // end if