Copy link to clipboard
Copied
In my old site (for php 5) I used in the query: WHERE Jaartal < Year (CURDATE())-25
i am upgrading the site to php 7, but it seems that this 'Year (CURDATE())-25 ' is not good anymore?
I connect to a mysql database
Copy link to clipboard
Copied
This is not PHP. It's SQL.
https://learnsql.com/cookbook/how-to-get-yesterdays-date-in-mysql/
Copy link to clipboard
Copied
As Nancy has rightly stated, this is a PDO query. If you have a close look at the created query
You will see that you are selecting a year that is less than 0. Unless you have catered for negative years, you will not get any results.