wp-orm icon indicating copy to clipboard operation
wp-orm copied to clipboard

where_any queries failing

Open kcargile opened this issue 10 years ago • 1 comments

The construction of the OR clause for where_any is trimming one too many characters, thereby rendering the query invalid.

Query.php, line 477:

$where = substr($where, 0, -5) . ')';

should be

$where = substr($where, 0, -4) . ')';

Happy to submit a pull request.

kcargile avatar Oct 18 '14 22:10 kcargile

I concur with kcargile. -5 should be replaced with -4 else last inverted commas " gets trimmed, thus failing the query.

nirajkvinit avatar Mar 17 '16 10:03 nirajkvinit