如何在 symfony 中转换 propel 标准
从 tv_channel a 中选择 a.id、b.title、b.start_time、b.end_time 在 a.id = b.tv_channel_id 和 b.start_time >= '2011-09-23 12:00:00' 和 b.end_time <= '2011-09-23 14:30:00' 上左连接 tv_program b 按代码订购 限制 0、10;
–寻呼机对象 tnx
select a.id, b.title, b.start_time, b.end_time from tv_channel a
left join tv_program b on a.id = b.tv_channel_id and b.start_time >= ‘2011-09-23 12:00:00′ and b.end_time <= '2011-09-23 14:30:00'
order by a.code
limit 0, 10;
–pager object
tnx
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
![扫码二维码加入Web技术交流群](/public/img/jiaqun_03.jpg)
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
问题是什么?您想在 Propel 中编写此 SQL 查询吗?
类似的东西应该可以工作,但要小心
addJoinCondition
中传递的值,这里没有绑定,如果你想更改这些值,你必须使用它来防止 SQL 注入或其他安全问题。What's the question ? Do you want to write this SQL query in Propel ?
Something like that should work but be be careful about values passed in
addJoinCondition
, there is no binding here and if you want to change these values you have to use it to prevent SQL injections or other security issues.