what the alternative of FETCH_KEY_PAIR if it is deprecated in Doctrine DBAL 3.0

Viewed 572

It was very convenient tool to fetch data from SELECT as $id => $value in result:

$result = $this->conn->executeQuery("SELECT id, value, FROM table")->fetch(PDO::FETCH_KEY_PAIR);

, but now I have an ERROR:

Using a PDO fetch mode or their combination (12 given) is deprecated and will cause an error in Doctrine DBAL 3.0 Can you suggest good alternative of this data scheme?

0 Answers
Related