single quotes bug
This commit is contained in:
@@ -7,7 +7,7 @@ $Source$
|
|||||||
|
|
||||||
2002-11-11 Marc Delisle <lem9@users.sourceforge.net>
|
2002-11-11 Marc Delisle <lem9@users.sourceforge.net>
|
||||||
* libraries/sqlparser.lib.php3: LEFT JOIN ... USING
|
* libraries/sqlparser.lib.php3: LEFT JOIN ... USING
|
||||||
* libraries/sqlparser.lib.php3: bug 636575 (double quotes)
|
* libraries/sqlparser.lib.php3: bug 636575 (double and single quotes)
|
||||||
|
|
||||||
2002-11-10 Alexander M. Turek <rabus@users.sourceforge.net>
|
2002-11-10 Alexander M. Turek <rabus@users.sourceforge.net>
|
||||||
* lang/german-*.inc.php3: Fixed a typo.
|
* lang/german-*.inc.php3: Fixed a typo.
|
||||||
|
@@ -700,6 +700,7 @@ if (!defined('PMA_SQP_LIB_INCLUDED')) {
|
|||||||
// ==============================
|
// ==============================
|
||||||
if (($arr[$i]['type'] == 'quote_backtick')
|
if (($arr[$i]['type'] == 'quote_backtick')
|
||||||
|| ($arr[$i]['type'] == 'quote_double')
|
|| ($arr[$i]['type'] == 'quote_double')
|
||||||
|
|| ($arr[$i]['type'] == 'quote_single')
|
||||||
|| ($arr[$i]['type'] == 'alpha_identifier')) {
|
|| ($arr[$i]['type'] == 'alpha_identifier')) {
|
||||||
|
|
||||||
//TODO: check embedded double quotes or backticks?
|
//TODO: check embedded double quotes or backticks?
|
||||||
@@ -714,6 +715,11 @@ if (!defined('PMA_SQP_LIB_INCLUDED')) {
|
|||||||
$identifier = str_replace('"','',$arr[$i]['data']);
|
$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 ($subresult['querytype'] == 'SELECT') {
|
||||||
if (!$seen_from) {
|
if (!$seen_from) {
|
||||||
if ($previous_was_identifier) {
|
if ($previous_was_identifier) {
|
||||||
@@ -884,6 +890,7 @@ if (!defined('PMA_SQP_LIB_INCLUDED')) {
|
|||||||
// token is not an identifier
|
// token is not an identifier
|
||||||
if (($arr[$i]['type'] != 'alpha_identifier')
|
if (($arr[$i]['type'] != 'alpha_identifier')
|
||||||
&& ($arr[$i]['type'] != 'quote_double')
|
&& ($arr[$i]['type'] != 'quote_double')
|
||||||
|
&& ($arr[$i]['type'] != 'quote_single')
|
||||||
&& ($arr[$i]['type'] != 'quote_backtick')) {
|
&& ($arr[$i]['type'] != 'quote_backtick')) {
|
||||||
$previous_was_identifier = FALSE;
|
$previous_was_identifier = FALSE;
|
||||||
} // end if
|
} // end if
|
||||||
|
Reference in New Issue
Block a user