I want to get an array of values ββfrom the id column of the auction table. If it were raw SQL, I would write:
SELECT id FROM auction
But when I do this in the Doctrine and do:
$em->createQuery("SELECT a.id FROM Auction a")->getScalarResult();
I get an array like this:
array( array('id' => 1), array('id' => 2), )
Instead, I would like to get an array like this:
array( 1, 2 )
How can I do this with Doctrine?
php doctrine2
JohnM2 Jul 25 '12 at 20:10 2012-07-25 20:10
source share