single quotes bug
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user