Mysql last hour data

Multi tool use
Multi tool use


I tried several ways I found here, but it spits out more than the last hour.



The table has a field t_timestamp with data like:



It is now 2018-06-29 01:55:04



Above was created although I used something like:



Where is my thinking error?



I believe the solution is to this is to use TIMESTAMPDIFF instead of the DATE_SUB. Try something like the following:



WHERE TIMESTAMPDIFF(SECONDS, now(), t_timestamp) < 3600000



Hope this helps.



Usage of MySQL TIMESTAMPDIFF



Demo :http://sqlfiddle.com/#!9/f5e2c3/8/0



Solution:






By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

vxb4r5kT UhsSK5YG 1YM,xSrwLcRGlzdeSzuwHMA,wy5V UN99UBfIdUr qUm7Oplhllzx
TMr7apAU6hzYNCwJdVqoAMQ75FVBrX2AmgNbp

Popular posts from this blog

The Dalles, Oregon

영화 미래의 미라이 다시보기 (2018) 다운로드 링크 무료보기

Chuyện tình của sao nam Cbiz đem lòng yêu quản lý: Người tìm được chân ái, kẻ vẫn chưa chịu thừa nhận