diff --git a/src/elements/db/BlockQuery.php b/src/elements/db/BlockQuery.php index 87b995fa..9122e60f 100644 --- a/src/elements/db/BlockQuery.php +++ b/src/elements/db/BlockQuery.php @@ -221,9 +221,9 @@ public function type($value) else if ($value !== null) { $this->typeId = (new Query()) - ->select(['id']) - ->from(['{{%neoblocktypes}}']) - ->where(Db::parseParam('handle', $value)) + ->select(['neoblocktypes.id']) + ->from(['{{%neoblocktypes}} neoblocktypes']) + ->where(Db::parseParam('neoblocktypes.handle', $value)) ->column(); } else