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

_OR combiner doesn't work #184

Closed
dpDesignz opened this issue Apr 21, 2020 · 0 comments · Fixed by #185
Closed

_OR combiner doesn't work #184

dpDesignz opened this issue Apr 21, 2020 · 0 comments · Fixed by #185
Labels
error-bug Issues causing application termination. warning-bug Issues not causing scripts/routines to die/fail.

Comments

@dpDesignz
Copy link
Contributor

Describe the bug
If using _OR in a combiner it can't have the same value twice in the $whereClause. I came across this when trying to make a function to group WHERE clauses. Working on a fix now so hope to push that soon.

To Reproduce
Create a selecting statement using a where() and 2x eq(), with the first eq() having an _OR combiner

$db->selecting(
  "login_log",
  "login_id",
  where(
    eq("login_user_id", "1", _OR),
    eq("login_user_id", "2"),
  )
);

Expected behavior
The compiled SQL would be as follows

SELECT login_id FROM login_log WHERE login_user_id = '1' OR login_user_id = '2'

Environment (please complete the following information):

  • EZSQL Version : 4.0.9
  • PHP Version: 7.4.3
  • SQL Driver: PDO:mysql

PHP code snippet used

See above

@dpDesignz dpDesignz added error-bug Issues causing application termination. warning-bug Issues not causing scripts/routines to die/fail. labels Apr 21, 2020
dpDesignz added a commit to dpDesignz/ezsql that referenced this issue Apr 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
error-bug Issues causing application termination. warning-bug Issues not causing scripts/routines to die/fail.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant