-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Fix query binding with two colons in query #5117
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me but Database is my "blind spot" so I'd like @paulbalandan or @samsonasik to take a look.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I overlooked a detail in the later part. Sorry for the noise.
Thank you, @kenjis |
I have checked the differences between the two codes, and I don't see where is the functional difference. The change in code is that a So, if |
What are the two codes?
|
I understood, what your change influences is actually a line that is a bit below in the code: $sql = $hasNamedBinds ? $this->matchNamedBinds($sql, $binds) : $this->matchSimpleBinds($sql, $binds, $bindCount, $ml); |
Though, the code would fail with named binds, simply if there is a "?" somewhere in the supplied SQL string. As a quick example: SELECT * FROM songs WHERE band = :band: AND title = 'Do You Love Me?'
|
Refs #5138. |
Description
Fixes #5114
Checklist: