From 60dec4008bff11e8bcdde702d033f4fbf3663965 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Va=C5=A1=C3=AD=C4=8Dek?= Date: Mon, 12 Sep 2022 13:59:33 +0200 Subject: [PATCH] Wrong operator format (#19548) Based on the docs and mainly my experience with Yii, I believe the "and" operator format here is wrong. The condition parts which the "and" separates have to be each in an array, otherwise the where() doesn't know where the condition starts and where ends. --- docs/guide/db-query-builder.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/guide/db-query-builder.md b/docs/guide/db-query-builder.md index f2d4248479..c915c416b8 100644 --- a/docs/guide/db-query-builder.md +++ b/docs/guide/db-query-builder.md @@ -879,10 +879,10 @@ Using the operator format, it would look like the following: ```php [ 'and', - '>', 'posts', $minLimit, - '>', 'comments', $minLimit, - '>', 'reactions', $minLimit, - '>', 'subscriptions', $minLimit + ['>', 'posts', $minLimit], + ['>', 'comments', $minLimit], + ['>', 'reactions', $minLimit], + ['>', 'subscriptions', $minLimit] ] ```