Selecting records from DB in a time interval?


Warning: count(): Parameter must be an array or an object that implements Countable in /home/styllloz/public_html/qa-theme/donut-theme/qa-donut-layer.php on line 274
0 like 0 dislike
11 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 | 11 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 12, 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
35,573 users