【发布时间】:2026-02-02 01:15:01
【问题描述】:
我正在尝试从数据库中获取查询结果。
$em2 = $this->getDoctrine()->getManager();
$qb=$em2->createQuery('select count(DISTINCT hotel_id) FROM search_result where request_id=:searchId')->setParameter('searchId',$searchId);
$result = $qb->getResult();
并得到错误:
ine 0, col 37 靠近“search_result”:错误:“search_result”类是 未定义。
【问题讨论】:
标签: php symfony doctrine-orm doctrine-query