我有mysql查询
SELECT `users`.`user_id`, `tool`.`name` FROM `users` LEFT JOIN
`project` ON
`users`.`user_id` = `project`.`user_id` LEFT JOIN `tools` ON `users`.'user_id' = `tools`.`user_id` AND `project`.`project_id` = `tools`.`project_id`
Where project_id = value
and user_id = value
我的学说查询就是这个
$query = $queryBuilder->select ( array (
'user.userId',
'user.name',
))
->from('Users', 'users')
->leftJoin(user.project, project)
->leftJoin(user.tool, tool)
->where(user.userId = value)
->andWhere(project.projectId = value)
现在我将如何包含 AND project
。project_id
= tools
。“project_id
部分到Doctrine查询构建器
没有