piribipipi Posted February 21, 2019 Share Posted February 21, 2019 HI... its possible to order a query by 2 different fields in a renderlist?? for example, i have module with 2 important fields called Priority and Status. I would like to order by priority DESC and status ASC... but i dont find a way to do that.... is that possible????? thanks Link to comment Share on other sites More sharing options...
NemoPS Posted February 21, 2019 Share Posted February 21, 2019 It seems like you canhttp://www.mysqltutorial.org/mysql-order-by/ Link to comment Share on other sites More sharing options...
piribipipi Posted February 21, 2019 Author Share Posted February 21, 2019 hi @NemoPs Yes, i know how to order by two fields on mysql... but... how can i do that with a helperlist in Prestashop?? when u create an admin controller, u can specify this parameters for example: $this->_orderBy = 'priority'; $this->_orderWay = 'DESC'; But... there is a way to do something like this: $this->_orderBy = 'priority, status'; $this->_orderWay = 'DESC, ASC'; I hope u understand my idea Thank u so much Link to comment Share on other sites More sharing options...
NemoPS Posted February 22, 2019 Share Posted February 22, 2019 Unless that one you posted works, then no, you can't with the helper. I haven't tried with it to be honest, but it will probably not work Link to comment Share on other sites More sharing options...
piribipipi Posted February 22, 2019 Author Share Posted February 22, 2019 no, it didnt work hahaha Well, i will continue searching a solution! thank you! Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now