2016年8月18日4時52分14秒的是,我從數據庫中獲取跟蹤從那裏我想加載更多記錄這是小於查詢where timestamp <timestamp not working?
此時間戳代碼
foreach($explode as $stat){
if($statement == ""){
$statement .= "`userid` = '$stat'";
}else{
$statement .= "OR `userid` = '$stat'";
}
}
}
$result = $link->query("SELECT * FROM `things` WHERE $statement AND `times` < '$time' ORDER BY `times` DESC LIMIT 20");
times
是我想對查詢時間戳字段,但它返回的日期比
例如
id--------------times
63 8/18/2016 1:25:43 AM
---
---
---
---
---
93 8/18/2016 6:41:12 AM
更大
所以$ time變量是2016-08-18 04:52:14但它返回的行數93下降了20,我真的可以用一些建議謝謝你的時間
是什麼列次datetype? – Jens
@Jens它是時間戳 – JRowan
我認爲它與查詢中日期的格式有關 – Jens