Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

script dies when query is not well-formed #46

Closed
GoogleCodeExporter opened this issue Mar 22, 2016 · 3 comments
Closed

script dies when query is not well-formed #46

GoogleCodeExporter opened this issue Mar 22, 2016 · 3 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?

1. execute this code :

$sql = 'SELECT [CONCAT(a, b)] from c';
$parser = new PHPSQLParser($sql, true);

2. script dies with this message :

cannot calculate position of b) within , b)] from c

What is the expected output? What do you see instead?

The documentation says the query should be well-formed, so this is probably 
more of an enhancement request. Would it be possible to throw an Exception 
instead of using 'die' and 'exit' in the library?
Or is there an easy way for the client code to recover from such an error?

What version of the product are you using? On what operating system?

r235 on windows7

Please provide any additional information below.

Original issue reported on code.google.com by nderm...@adequasys.com on 22 Apr 2012 at 6:30

@GoogleCodeExporter
Copy link
Author

I have added a stop() method, which is called on critical conditions, you can 
overwrite it in a sub-class. 

Original comment by pho...@gmx.de on 26 Apr 2012 at 12:33

  • Changed state: Started

@GoogleCodeExporter
Copy link
Author

I have removed the stop method and throw now exceptions.

Original comment by pho...@gmx.de on 26 Apr 2012 at 3:52

@GoogleCodeExporter
Copy link
Author

Original comment by pho...@gmx.de on 30 Apr 2012 at 11:25

  • Changed state: Fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant