I have two dates:
10-11-2010 and 17-11-2010
Now i would like to SELECT all rows with the dates between those two.
How can I do that?
它在where子句between
使用非常简单, 阅读更多
select * from mytable where date between '10-11-2010' and '17-11-2010'
Sounds like a SQL question. Try the between condition.
$datefrom=date('Ym-d'); $dateto=date('Ym-d');
$sql = 'select * from mytable where depositdate between $datefrom and $dateto';
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.