Jump to content

How can I add an orderBy clause ?


renaud2263

Recommended Posts

Hi everybody,

In my __construct() I have this request:

$this->_select = 'a.*, DATE(a.dlc) AS dlc, pl.name AS pname';
			$this->_join = '
			INNER JOIN `'._DB_PREFIX_.'product_lang` pl ON (pl.`id_product` = a.`id_product` AND pl.`id_lang` = '.(int)$this->context->language->id.')';
			$this->_orderBy = 'a.id_product';
			$this->_orderWay = 'ASC';
			$this->_group = 'GROUP BY a.id';

My simple question: I would like to order by a.id_product AND another field. I tried many ways but always return error bad request.

How can I do ?

Link to comment
Share on other sites

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

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...