我在 Doctrine 2.3.3 中编写一个查询,我想从 4 个不同的表中检索数据。现在我编写了一个适用于单连接的查询。但是当我编写多个连接查询时,它会显示一个错误..
我的查询是
$query = $parent->entityManager->createQuery('SELECT t,s,q,d FROM TblEmployee t JOIN TblEmployeeShifts s JOIN TblEmployeeQualification q JOIN TblEmployeeDepartment d where t.employeeId = s.employeeId and t.employeeId = d.employeeId and t.employeeId = q.employeeId and t.employeeId ='.$data);
但上面的查询给了我一个错误,如下所示,
[Syntax Error] line 0, col 89: Error: Expected =, <, <=, <>, >, >=, !=, got 'q'
请指导我在哪里我错了..