What steps will reproduce the problem?
1. execute the following code :
$sql = "SELECT 'a string with an escaped quote \' in it' AS some_alias FROM
some_table";
echo $sql . "\n";
$parser = new PHPSQLParser($sql, true);
print_r($parser->parsed);
What is the expected output? What do you see instead?
expected output : a SELECT and a FROM index in the parsed array.
instead : only a SELECT, and the base_expr is incorrect (contains the FROM
keyword and the end of the query)
Array
(
[SELECT] => Array
(
[0] => Array
(
[expr_type] => const
[alias] =>
[base_expr] => 'a string with an escaped quote \' in it' AS some_alias FROM some_table
[sub_tree] =>
[position] => 7
)
)
)
What version of the product are you using? On what operating system?
rev 235, on windows 7.
Original issue reported on code.google.com by nderm...@adequasys.com on 20 Apr 2012 at 1:46
Original issue reported on code.google.com by
nderm...@adequasys.com
on 20 Apr 2012 at 1:46