I used following code
->order(new \Zend_Db_Expr('FIELD(option_id,' . implode(',', $totalPro).')'));
That give following warning.
Direct object instantiation (object of \Zend_Db_Expr) is discouraged in Magento 2.
How to remove this warning?
Magento Stack Exchange is a question and answer site for users of the Magento e-Commerce platform. It only takes a minute to sign up.Sign up to join this community