From cd1e9f4a99c7279a72b6a87dfcbb2f4334f9cc6b Mon Sep 17 00:00:00 2001 From: Alexander Makarov Date: Tue, 20 Jan 2015 21:52:34 +0300 Subject: [PATCH] Added example for IS NOT NULL to query builder guide --- docs/guide/db-query-builder.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/guide/db-query-builder.md b/docs/guide/db-query-builder.md index 28c2b8444d..7f2c1f5ff2 100644 --- a/docs/guide/db-query-builder.md +++ b/docs/guide/db-query-builder.md @@ -184,6 +184,12 @@ results in this WHERE clause: WHERE (`status` IS NULL) ``` +If you need `IS NOT NULL` you can use the following: + +```php +$query->where(['not', ['col' => null]]); +``` + You can also create sub-queries with `Query` objects like the following, ```php