Error:

SELECT DISTINCT A.ProductId, ProductName, ProductPrice, Picture, IsNew, PromoStartDate, PromoEndDate, PromoDiscount, A.SEOURLName, DAY(PromoEndDate) AS DPED, MONTHNAME(PromoEndDate) AS MPED, YEAR(PromoEndDate) AS YPED FROM tbl_gf_products A, tbl_gf_product_categories B, tbl_gf_category C WHERE A.ProductId = B.ProductId AND B.CategoryId = C.CategoryId AND DisableProduct = 0 ORDER BY POrderBy DESC LIMIT 0, 50

Expression #1 of ORDER BY clause is not in SELECT list, references column 'unlockca_dbunlckcaregsm.A.POrderBy' which is not in SELECT list; this is incompatible with DISTINCT