Missing of Wherein and whereNotIn query handling
Opened this issue · 3 comments
khleung commented
I found the latest version never handled the Wherein and whereNotIn clause in the coding
the "values" of $wheres was overlooked. Bindings values were being omitted and caused errors:
To make my Wherein and whereNotIn clauses works,
I added the followings missing coding into if statement of private function compileForSelect(Builder $builder, $bindings) :
} else if (
isset($wheres[$ind]['values']) &&
isset($tipos[strtolower($wheres[$ind]['column'])])
) {
if (is_array($wheres[$ind]['values'])) {
foreach ($wheres[$ind]['values'] as $value) {
if (
in_array(
strtolower($tipos[
strtolower($wheres[$ind]['column'])
]),
$this->withoutQuotes
)
) {
if (!is_null($bindings[$i])) {
$newBinds[$i] = $bindings[$i] / 1;
} else {
$newBinds[$i] = null;
}
} else {
$newBinds[$i] = (string) $bindings[$i];
}
$i++;
}
}
}
}
murbagus commented
hello, have you fix it?
jcrodriguezt commented
Thanks @khleung your proposal worked for me.