Doctrine DBAL setParameter() with array value

前端 未结 1 628
半阙折子戏
半阙折子戏 2021-02-07 18:32

I\'m using doctrine DBAL and have some problem with SQL query as result of a queryBuilder.

$builder = $this->getConnection()->getQueryBuilder();
$builder-&         


        
1条回答
  •  别那么骄傲
    2021-02-07 19:26

    Try with

    $builder->andWhere('type IN (:string)');
    $builder->setParameter('string', array('first','second'), \Doctrine\DBAL\Connection::PARAM_STR_ARRAY);
    

    0 讨论(0)
提交回复
热议问题