Browse Source

LuModel getMultiple where update

tags/0.1.0
Robin Thoni 8 years ago
parent
commit
90cb2dc56a
1 changed files with 8 additions and 1 deletions
  1. 8
    1
      src/Utils/LuDataAccess.php

+ 8
- 1
src/Utils/LuDataAccess.php View File

@@ -92,9 +92,16 @@ abstract class LuDataAccess {
92 92
      */
93 93
     public static function getMultiple($predicates, $orders, $page = 0, $perPage = PHP_INT_MAX)
94 94
     {
95
+        /**
96
+         * @var $model LuModel
97
+         */
95 98
         $model = static::getModel();
96 99
         foreach($predicates as $predicate) {
97
-            $model = $model->where($predicate[0], $predicate[1], $predicate[2]);
100
+            $column = $predicate[0];
101
+            $operator = $predicate[1];
102
+            $value = $predicate[2];
103
+            $boolean = isset($predicate[3]) ? $predicate[3] : null;
104
+            $model = $model->where($column, $operator, $value, $boolean);
98 105
         }
99 106
         $count = $model->count();
100 107
         foreach($orders as $order) {

Loading…
Cancel
Save