Skip to main content
Known Participant
Jan 20, 2021 4:09 PM UTC
Question

conditions in app connect

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

 

 

 

This topic is closed to new replies. Start a new post to keep the conversation going.

2 replies

BenPleysier
Community Expert
Community Expert
Jan 20, 2021 11:21 PM UTC

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.

Translate
Wappler is the DMXzone-made Dreamweaver replacement and includes the best of their powerful extensions, as well as much more!
Nancy OShea
Community Expert
Community Expert
Jan 20, 2021 7:28 PM UTC
Nancy O'Shea— Product User & Community Expert