E
E
Erkin Pardayev2017-06-18 19:52:37
MySQL
Erkin Pardayev, 2017-06-18 19:52:37

Get rows remaining X days before execution, fetch from datetime?

There is a table for orders. This table stores a lot of data, including the date of the order (DATETIME type). How is it possible to implement an SQL query that selects orders that have 1, 3, 5 ... days left until completion?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Daniel Besedny, 2017-07-20
@danbes1

SELECT order FROM table_name WHERE date < 1

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question