D
D
dllweb2014-07-11 15:33:48
PHP
dllweb, 2014-07-11 15:33:48

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.
BWn8t5Fj9QY.jpg
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

3 answer(s)
I
Ilya Lesnykh, 2014-07-11
@Aliance

What's wrong with writing like this:
I would suggest altering the fields by changing the type to timestamp.

A
Alex Kheben, 2014-07-11
@zBit

What is a DBMS?

I
iDennis, 2014-07-11
@iDennis

where is the calendar from?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question