Answer the question
In order to leave comments, you need to log in
How to take values from the database not for every minute, but for every 5 minutes?
The price value is added to the database once a minute, if I make a selection for the whole day, then I will show all the price values for each minute, but is it possible to somehow "cut" the array so that the values \u200b\u200bare shown for every 5 minutes, respectively all other values were simply deleted and the array would be 5 times smaller?
For example:
| id | price | time |
|-----|-------|-------|
| 1 | 100 | 15:01 |
| 2 | 200 | 15:02 |
| 3 | 220 | 15:03 |
| 4 | 115 | 15:04 |
| 5 | 221 | 15:05 |
| 6 | 220 | 15:06 |
| ... | ... | ... |
| 10 | 219 | 15:10 |
| id | price | time |
|-----|-------|-------|
| 1 | 221 | 15:05 |
| 2 | 219 | 15:10 |
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question