[英]select from a mysql table records that belong to today
我在我的表中有一個名為time
為INT的字段,並且使用php time()函數使用iam現在我要選擇其time
為今天的所有記錄
$sql = "SELECT * FROM table WHERE time >= '".strtotime("today")."' AND time < '".strtotime("tommorow")."'";
SELECT * FROM mytable where DATE(`time`) = DATE(NOW());
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.