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

"FROM DUAL" incorrectly appended when "from" at begin of line #43

Closed
ewbarnard opened this issue Sep 13, 2019 · 1 comment
Closed

"FROM DUAL" incorrectly appended when "from" at begin of line #43

ewbarnard opened this issue Sep 13, 2019 · 1 comment

Comments

@ewbarnard
Copy link

See Database/Driver/OracleBase.php line 175:

if (strpos($statement, 'select') !== 0 || preg_match('/ from /', $statement)) {

When the "from" part of the query is at the start of a line (formatted for multiple lines), FROM DUAL is appended to the statement, causing the query to fail. I fixed the query by adding a space before from. We should be able to fix OracleBase.php by changing the regular expression to /\sfrom\s/, allowing any whitespace.

@skie
Copy link
Member

skie commented Mar 12, 2020

applied for 4.0

@skie skie closed this as completed Mar 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants