| @@ 270-278 (lines=9) @@ | ||
| 267 | } |
|
| 268 | return self::findQ($str, $found+1, $no-1); |
|
| 269 | } |
|
| 270 | static public function having(Context $context, $expr, $args){ |
|
| 271 | if(is_string($expr)){ |
|
| 272 | self::condition($context, 'HAVING', $expr, $args); |
|
| 273 | }else{ |
|
| 274 | self::conditionArgs($context, 'HAVING', $expr); |
|
| 275 | } |
|
| 276 | //TODO 支持 OR 、 闭包 |
|
| 277 | ||
| 278 | } |
|
| 279 | static public function where(Context $context, $expr, $args){ |
|
| 280 | if(empty($expr)){ |
|
| 281 | return; |
|
| @@ 279-289 (lines=11) @@ | ||
| 276 | //TODO 支持 OR 、 闭包 |
|
| 277 | ||
| 278 | } |
|
| 279 | static public function where(Context $context, $expr, $args){ |
|
| 280 | if(empty($expr)){ |
|
| 281 | return; |
|
| 282 | } |
|
| 283 | if (is_string($expr)){ |
|
| 284 | self::condition($context, 'WHERE', $expr, $args); |
|
| 285 | }else{ |
|
| 286 | self::conditionArgs($context, 'WHERE', $expr); |
|
| 287 | } |
|
| 288 | //TODO 支持 OR 、 闭包 |
|
| 289 | } |
|
| 290 | ||
| 291 | /** |
|
| 292 | * find like Mongodb query glossary |
|