• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion
  • Inviting everyone to the UX test of a new security feature in the WP Toolkit
    For WordPress site owners, threats posed by hackers are ever-present. Because of this, we are developing a new security feature for the WP Toolkit. If the topic of WordPress website security is relevant to you, we would be grateful if you could share your experience and help us test the usability of this feature. We invite you to join us for a 1-hour online session via Google Meet. Select a convenient meeting time with our friendly UX staff here.

Problem with query

HellCore

New Pleskian
Hi,
I have a part of query which works on localhost but not on my VPS server

SELECT * FROM ps_order_discount
LEFT JOIN ps_orders ON ps_order_discount.id_order = ps_orders.id_order AND name = '$user
Code:
' 
LEFT JOIN ps_order_detail ON ps_order_detail.id_order = ps_orders.id_order 
LEFT JOIN ps_order_history ON ps_order_history.id_order = ps_orders.id_order
WHERE DATE_SUB(CURDATE(),INTERVAL 18 DAY) <= ps_order_history.date_add and (module='cashondelivery' OR module='transferuj' AND id_order_state = 2 OR module='paypal' AND id_order_state = 2)

Everything is fine except this:
DATE_SUB(CURDATE(),INTERVAL 18 DAY) <= ps_order_history.date_add

This part should shows records that are 18 days old from today but it doesn't work. 
Maybe something is wrong on phpMyAdmin or plesk settings?
 
Back
Top