zelakioui Posted February 4, 2016 Share Posted February 4, 2016 When I extends adminController, and define values to display in $this->_select variable, Prestashop display this error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' a.id_product, a.store_name FROM `ps_selstock_product` a LEF' at line 3 SELECT SQL_CALC_FOUND_ROWS , a.id_product, a.store_name FROM `ps_selstock_product` a LEFT JOIN `ps_product` al ON (al.`id_product` = a.`id_product`) WHERE 1 ORDER BY a.`id_selstock_product` ASC LIMIT 0,50 My $this->_select variable contains: $this->_select = 'a.id_product, a.store_name'; I know the query should be like this one, deleting ',': SELECT SQL_CALC_FOUND_ROWS a.store_name, a.id_product FROM `ps_selstock_product` a WHERE 1 ORDER BY a.`id_selstock_product` ASC LIMIT 0,50 But I don't know how to process because the query is built by prestashop I defined just the attributes to display Link to comment Share on other sites More sharing options...
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!Register a new account
Already have an account? Sign in here.Sign In Now