P
P
ptaher2016-04-11 13:58:20
PHP
ptaher, 2016-04-11 13:58:20

Printing mysql database values?

Hello.
There is a database, any.
It contains the values ​​of the sensor readings and the date when the value was taken.
It is necessary to display these values ​​on the site in the interval that the user selects.
Please, mb who has similar lessons, or you can write/help write the code yourself, help.
ps there were options to make a chart with datarangepicker for lessons, but there is not enough knowledge to adapt it for yourself.
it is also possible when the user enters the date value into the form, and at the output receives the values ​​from the database. I'm really bad with mysql and the database, so I'm asking for help.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
R
Regretful, 2016-04-11
@regretful

Here is your request

SELECT *
FROM `TABLE_NAME`
WHERE `date_start` <= '2016-03-11' AND `date_end` >= '2016-04-11'

V
Valery, 2016-04-11
@supervaleha

It's also possible like this:

SELECT
   *
FROM
   `TABLE_NAME`
BETWEEN 
   '2016-03-01' AND '2016-03-10'

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question