mysql 到 symfony 1.4.9 中的 Criteria()
我在 mySQL 中有以下复杂查询
SELECT courseId,courseName
FROM course WHERE courseId NOT IN (SELECT courseId FROM coursestaken NATURAL JOIN student WHERE grade >= 60 AND studentId =2)
AND
courseId NOT IN (SELECT courseId FROM stable WHERE studentId = 2 )
AND
courseId NOT IN (SELECT DISTINCT courseId FROM prerequisites
WHERE
prereqId NOT IN (SELECT courseId FROM coursestaken NATURAL JOIN student WHERE grade >= 60 AND studentId =2 )) ;
有人可以帮我将其转换为 Propel 中的 Criteria() 查询吗?
I have the following complex query in mySQL
SELECT courseId,courseName
FROM course WHERE courseId NOT IN (SELECT courseId FROM coursestaken NATURAL JOIN student WHERE grade >= 60 AND studentId =2)
AND
courseId NOT IN (SELECT courseId FROM stable WHERE studentId = 2 )
AND
courseId NOT IN (SELECT DISTINCT courseId FROM prerequisites
WHERE
prereqId NOT IN (SELECT courseId FROM coursestaken NATURAL JOIN student WHERE grade >= 60 AND studentId =2 )) ;
Can someone help me convert this to a Criteria() query in Propel?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
尝试在 propel 中使用准备函数,如下所示
Try using prepare function in propel like below