• Introducing WebPros Cloud - a fully managed infrastructure platform purpose-built to simplify the deployment of WebPros products !  WebPros Cloud enables you to easily deliver WebPros solutions — without the complexity of managing the infrastructure.
    Join the pilot program today!
  • Support for BIND DNS has been removed from Plesk for Windows due to security and maintenance risks.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS.

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