如何组合dql查询

时间:2016-11-28 11:38:21

标签: dql

我有两个DQL查询

<input type="datetime-local" value="<?php echo $row['Time']; ?>" class="date" name="start" REQUIRED>

$dql = "SELECT i FROM Edufaction\Bundle\EdufactionBundle\Entity\Institute i JOIN i.instsummary s where s.instaffiliation IN ($affiliation1)";

如何将这两个查询合并为单个查询?

1 个答案:

答案 0 :(得分:0)

你可以使用AND运算符

尝试这样的事情
$dql = "SELECT i FROM Edufaction\Bundle\EdufactionBundle\Entity\Institute i JOIN i.instsummary s where s.instaffiliation IN ($affiliation1) AND  i.institutefeerange IN ($feerange)";