Using PHP PDO and psql
My query:
$stmt = $this->pdo->prepare("select distinct extract(year from conclusion) from agreements_register where conclusion is not null");
$stmt->execute();
return $stmt->fetchAll();
it returns this:
[['date_part' => 2021],['date_part' => 2022]]
but I need this:
[2021, 2022]