diff --git a/src/Command/CommandInterface.php b/src/Command/CommandInterface.php index 975cb9abf..6df6685f3 100644 --- a/src/Command/CommandInterface.php +++ b/src/Command/CommandInterface.php @@ -680,8 +680,8 @@ public function queryOne(): array|null; /** * Execute the SQL statement and returns the value of the first column in the first row of data. - * * This method is best used when you need only a single value. + * Do not use this method for `boolean` values as it returns `false` if there is no value. * * @throws Exception * @throws Throwable If execution failed. diff --git a/src/Query/QueryInterface.php b/src/Query/QueryInterface.php index 75ed79905..da42a8fcc 100644 --- a/src/Query/QueryInterface.php +++ b/src/Query/QueryInterface.php @@ -288,8 +288,8 @@ public function prepare(QueryBuilderInterface $builder): self; /** * Returns the query results as a scalar value. - * * The value returned will be the first column in the first row of the query results. + * Do not use this method for `boolean` values as it returns `false` if the query result is empty. * * @throws Exception * @throws InvalidConfigException