问题描述
$numbers = [
"3286340600316","3286340619912","3286340641418","3286340883818","3286340960618",];
$connection = $this->entityManager->getConnection();
$result = $connection->createqueryBuilder()
->select('a.specification')
->from('article','a')
->innerJoin('a','ware','b','a.articleId = b.articleId')
->andWhere('a.number IN (:numbers)')
->setParameter('numbers',$str)
->execute()->fetchAll();
当我将数组直接传递给查询时,它会返回“通知:数组到字符串的转换”。
所以我将数组内嵌为字符串;
$str = implode(',',$numbers);
当我通过$str
时,它返回空记录。它不应该返回空。
有人可以帮助我在这里做错什么吗?
谢谢。
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)