O
O
Outoverlay2015-11-30 11:04:03
PHP
Outoverlay, 2015-11-30 11:04:03

Why can't this be done?

SELECT `table_name`, `table_name2` FROM `db_name` WHERE '1447372799' - UNIX_TIMESTAMP(`time`) > 0 AND '1447286400' < UNIX_TIMESTAMP(`time`);

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Alexander, 2015-11-30
@Outoverlay

Use BETWEEN in the comparison condition, just pass in the 2 constructed dates/values ​​you need.

WHERE UNIX_TIMESTAMP(`time`) BETWEEN dateA and dateB

A
Anatoly Medvedev, 2015-11-30
@balamyt92

because:

SELECT список полей FROM список таблиц WHERE условия…

R
Robot, 2015-11-30
@iam_not_a_robot

And how to be? If it is necessary to receive unixtime from datetime?

Any date can be used, just gave an example.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question