Answer the question
In order to leave comments, you need to log in
ORDER BY on the result of dividing numbers from two fields of another table, how?
Hello, I need to sort in the ride table by the result of dividing the values from two columns in the user table.
There are 2 tables:
Ride model is connecting
public function getRideCustomer()
{
return $this->hasOne(User::className(), ['user_id' => 'ride_customer_id']);
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question