Good time! I know there are many similar questions here, I looked through them but did not find a suitable option - I just tried it did not work. In the comments to neksolski questions asked a question but also failed to figure it out - by this, do not hit with your feet) the essence is
$datenow = date("Ymd"); $tmpact = mysql_query("SELECT * FROM actions WHERE fdate <= '$datenow' AND tohda <= '$datenow'"); the fdate and tohda fields contain strings with the following dates in the database:
fdate - 2016-11-12 and 2016-09-02 and tohda - 2017-08-14 and 2018-08-01 respectively
but the query returns 0 rows, even if I remove the WHERE conditions completely, I just make a selection, then everything is selected, the query passes, the fields in BD contain dates (fdate and tohda) of data type DATE. I also tried STR_TO_DATE - there is no effect either. Help please maybe I just don’t see any obvious things and even this doesn’t work like that when directly
$ tmpact = mysql_query ("SELECT * FROM actions WHERE fdate <= '2016-04-01' AND tohda <= '2016-04-01'");