• The APS Catalog has been deprecated and removed from all Plesk Obsidian versions.
    Applications already installed from the APS Catalog will continue working. However, Plesk will no longer provide support for APS applications.
  • Please be aware: with the Plesk Obsidian 18.0.78 release, the support for the ngx_pagespeed.so module will be deprecated and removed from the sw-nginx package.

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