2

Is it possible to divide two columns using the the query builder?

Like: $query -> fields('A', array('valsA') / 'B', array('valsB'));

1

For complex expressions you can use the addExpression() method, e.g.

$query->addExpression('A.valsA / B.valsB', 'alias');
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.