Selecting records from DB in a time interval?

0 like 0 dislike
6 views
Screenshot database prntscr.com/jcsbqo
There is such a request, but he did not choose the right value.
SELECT `ip_adreess` FROM `requests` WHERE `date_create` >= DATE_SUB(CURTIME(),INTERVAL 1 HOUR);
You need to choose `ip_adreess` in the period of the current time - 1 hour, how to do it?
by | 6 views

1 Answer

0 like 0 dislike
CURTIME() returns only the time without date. Use NOW().
by

Related questions

0 like 0 dislike
2 answers
asked Apr 11, 2019 by artmirarmi
0 like 0 dislike
1 answer
0 like 0 dislike
1 answer
asked May 22, 2019 by lexa_gorchakov19
110,608 questions
257,186 answers
0 comments
33,932 users