thinkphp between 查询ThinkPHP教程
select * from table_name where time>='2010-1-1' and time<='2010-5-1'
或
select * from table_name where time between '2010-1-1' and '2010-5-1'
thinkphp中可用语句:
$condition['id'] = ...
select * from table_name where time>='2010-1-1' and time<='2010-5-1'
或
select * from table_name where time between '2010-1-1' and '2010-5-1'
thinkphp中可用语句:
$condition['id'] = array(between,array('1','8'));
实际的查询语句:where('id' between '1' AND '8')
或
select * from table_name where time between '2010-1-1' and '2010-5-1'
thinkphp中可用语句:
$condition['id'] = array(between,array('1','8'));
实际的查询语句:where('id' between '1' AND '8')
最新评论
热门推荐
我要评论