File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -319,19 +319,18 @@ public function wherePrimary($key)
319319 */
320320 public function where ($ condition , ...$ params )
321321 {
322+ $ this ->emptyResultSet ();
322323 if (is_array ($ condition ) && $ params === []) { // where(array('column1' => 1, 'column2 > ?' => 2))
323324 foreach ($ condition as $ key => $ val ) {
324325 if (is_int ($ key )) {
325- $ this ->where ($ val ); // where('full condition')
326+ $ this ->sqlBuilder -> addWhere ($ val ); // where('full condition')
326327 } else {
327- $ this ->where ($ key , $ val ); // where('column', 1)
328+ $ this ->sqlBuilder -> addWhere ($ key , $ val ); // where('column', 1)
328329 }
329330 }
330- return $ this ;
331+ } else {
332+ $ this ->sqlBuilder ->addWhere ($ condition , ...$ params );
331333 }
332-
333- $ this ->emptyResultSet ();
334- $ this ->sqlBuilder ->addWhere ($ condition , ...$ params );
335334 return $ this ;
336335 }
337336
You can’t perform that action at this time.
0 commit comments