Answer the question
In order to leave comments, you need to log in
How to select records from a sql database with a certain interval?
Faced with a problem, you need to pull out the number of records for a certain period of time, the period of time is determined by the user.
There is a table in the database, with a datesend field of type INT.
Seconds are also stored in it. time() is the time of the time the record was created.
Date selection from and to which is determined by the user. Through the form.
From there, in the handler from 7-10-14, seconds are translated through mktime ()
, then the question is how to correctly form the request condition so that the result is from such and such to such and such a date.
Answer the question
In order to leave comments, you need to log in
What's wrong with writing like this:
I would suggest altering the fields by changing the type to timestamp.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question