Fetching rows added last hour

后端 未结 6 1929
北海茫月
北海茫月 2020-12-14 05:20

I keep a record of logins in a table. I have columns for id, ip, date and time. From that record of logins I wanna fetch logins made only in the last hour.

I\'m swe

6条回答
  •  隐瞒了意图╮
    2020-12-14 06:08

    without the specifics, I think Date_Add() would work.. by adding to your where clause an add of NOW negative hours

    (or Date_Sub() )

提交回复
热议问题