I have some problems with such mysql_query
mysql_query
INSERT INTO table VALUES ('', CURDATE()-1)
why if yestay is the last day of the month
The result CURDATE()-1is similar to2010-04-00
CURDATE()-1
2010-04-00
why not 2010-03-31
2010-03-31
When you mix date and number, the date is considered a number.
Try:
INSERT INTO table VALUES ('', date_sub(CURDATE(), interval 1 day));
What about the DATE_ADD function ?
Source: https://habr.com/ru/post/1739569/More articles:php, but with a new constructor ... maybe? - phpMouse scaling in WinForms? - c #Game platforms for Java game cards - javaxapian-full installed on mac os x snow leopard but failed with dlopen LoadError - ruby | fooobar.comGet Monitor Aspect Ratio - c #Using regexp to find a string matching multiple words in random order - regexCall javascript function after loading div - javascriptКак предотвратить уязвимость произвольного кода в наших программах? - securityProblems with DotNetZip with encoding - c #(php), how to "save" information in completed forms correctly - securityAll Articles