I'm trying to bind params to order by with expressions clause in Magento 2, my insecure code looks like:
$order = new \Zend_Db_Expr("POW((main_table.long - $this->_coordinates['lat']), 2) + POW((main_table.lat - {$this->_coordinates['lat']}), 2)");
$stores->getSelect()->order(array(
$order,
'main_table.title ASC'
));
How could I bind both variables to the query?