Notice: Undefined index: product_id in /customers/3/3/9/ on line 176 Fatal error: Uncaught exception 'Exception' with message 'Error: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'AND o.order_status_id=5' at line 2
Error No: 1064
SELECT sum(quantity) as total FROM `oc_order_product` op LEFT JOIN `oc_order` AS o ON op.order_id = o.order_id WHERE op.product_id = AND o.order_status_id=5' in /customers/3/3/9/ Stack trace: #0 /customers/3/3/9/ DB\MySQLi->query('SELECT sum(quan...', Array) #1 /customers/3/3/9/ DB->query('SELECT sum(quan...') #2 [internal function]: ModelPavdealsproduct->getTotalBought(NULL, 5) #3 /customers/3/3/9/ call_user_func_array(Array, Array) #4 [internal function]: Loader->{closure}(Array) #5 /customers/3/3/9/ in /customers/3/3/9/ on line 40