I\'m trying to create a Doctrine DBAL querybuilder object and setting a parameter in it. (using a postgres db, dbal 2.3.4, doctrine
$connection = $this->
try this:
$qb->where('tbl_user.pkid = :userid'); $qb->setParameter(':userid', 10);
then
$params = $qb->getParameters(); $stmt = $connection->prepare($qb->getSQL()); foreach ($params as $key=>$value){ $stmt->bindParam($key,$value); } $stmt->execute(); $result = $stmt->fetchAllAssociative();