如何使用 Codeigniter 的查询生成器方法编写 BETWEEN 条件?
如何在与活动记录类似的之间编写选择查询?
SELECT *
FROM test_tbl
WHERE date BETWEEN '$start' and '$end'
ORDER BY ID
How to write select query with between similar to this with active record?
SELECT *
FROM test_tbl
WHERE date BETWEEN '$start' and '$end'
ORDER BY ID
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
AFAIK,没有内置支持
BETWEEN
您可以这样做
或者编写一个如下所示的辅助函数
稍后,您可以通过调用它来使用该函数,例如
where_ Between('test_tbl ', $开始, $结束)
AFAIK, there's no built-in support for
BETWEEN
You can do this instead
Or write a helper function that look like this
Later on, you can use that function by calling it like
where_between('test_tbl', $start, $end)