开发者

mysql between query

I have this scheme:

--------------------开发者_运维问答------
| ID | data  | timestamp |
--------------------------

how i can make a query to show only today values? I now i need to use the BETWEEN statement, any idea?


SELECT   *
FROM     mytable
WHERE    DATE(timestamp) = CURDATE()

Or so I think.


select ID, date, timestamp
from yourtable
where DATE(`timestamp`) = CURDATE()
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜