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

Query::whereFieldSql bug when providing more than one parameter #228

Closed
wants to merge 1 commit into from
Closed

Query::whereFieldSql bug when providing more than one parameter #228

wants to merge 1 commit into from

Conversation

marcojetson
Copy link
Contributor

@marcojetson marcojetson commented Mar 16, 2017

Query::whereFieldSql fails to populate more than one placeholder

e.g.

$query->whereFieldSql('DATE(created)', 'BETWEEN ? AND ?', ['2016-01-01', '2017-01-01']);

results in "WHERE DATE(created) BETWEEN '2016-01-01' AND '2016-01-01'" because callback is shifting from $params but $params is not passing by reference... so it's just using first value every time

@tuupola
Copy link
Contributor

tuupola commented Mar 16, 2017

What does this PR do?

@vlucas
Copy link
Collaborator

vlucas commented Mar 17, 2017

@marcojetson Can you please add a test for this - preferably a test that would not pass before, and one that does now with these new changes?

@tuupola
Copy link
Contributor

tuupola commented Apr 10, 2017

@marcojetson Can you add tests for this?

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

Successfully merging this pull request may close these issues.

None yet

3 participants