File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -112,6 +112,10 @@ public function __call($method, $args)
112
112
// 根据某个字段获取记录的某个值
113
113
$ name = Db::parseName (substr ($ method , 10 ));
114
114
return $ this ->where ($ name , '= ' , $ args [0 ])->value ($ args [1 ]);
115
+ } elseif (strtolower (substr ($ method , 0 , 7 )) == 'whereor ' ) {
116
+ $ name = Loader::parseName (substr ($ method , 7 ));
117
+ array_unshift ($ args , $ name );
118
+ return call_user_func_array ([$ this , 'whereOr ' ], $ args );
115
119
} elseif (strtolower (substr ($ method , 0 , 5 )) == 'where ' ) {
116
120
$ name = Db::parseName (substr ($ method , 5 ));
117
121
array_unshift ($ args , $ name );
@@ -727,6 +731,17 @@ public function union($union, $all = false)
727
731
return $ this ;
728
732
}
729
733
734
+ /**
735
+ * 查询SQL组装 union all
736
+ * @access public
737
+ * @param mixed $union
738
+ * @return $this
739
+ */
740
+ public function unionAll ($ union )
741
+ {
742
+ return $ this ->union ($ union , true );
743
+ }
744
+
730
745
/**
731
746
* 指定查询字段 支持字段排除和指定数据表
732
747
* @access public
You can’t perform that action at this time.
0 commit comments