• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

conditions in app connect

Explorer ,
Jan 20, 2021 Jan 20, 2021

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

 

2021-01-20 (2).png

 

 

TOPICS
Code , Extensions

Views

241

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 20, 2021 Jan 20, 2021

Copy link to clipboard

Copied

This is not PHP.  It's SQL.

https://learnsql.com/cookbook/how-to-get-yesterdays-date-in-mysql/

 

Nancy O'Shea— Product User, Community Expert & Moderator
Alt-Web Design & Publishing ~ Web : Print : Graphics : Media

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 20, 2021 Jan 20, 2021

Copy link to clipboard

Copied

LATEST

As Nancy has rightly stated, this is a PDO query. If you have a close look at the created query

BenPleysier_0-1611184704116.png

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.

Wappler, the only real Dreamweaver alternative.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines