开发者

select from a mysql table records that belong to today

i have a field in my table called time its INT and iam using ph开发者_开发百科p time() function now i want select all records that its time is today


SELECT time FROM table WHERE DATE(column) = CURDATE();  

Check the following link :

  • Retrieve records by current date from MySQL


$sql = "SELECT * FROM table WHERE time >= '".strtotime("today")."' AND time < '".strtotime("tommorow")."'";


SELECT * FROM mytable where DATE(`time`) = DATE(NOW());
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜