catfan / Medoo

The lightweight PHP database framework to accelerate the development.
https://medoo.in
MIT License
4.83k stars 1.15k forks source link

How to compare two colums in where ? #686

Closed JiaoShuai closed 3 years ago

JiaoShuai commented 6 years ago

how to make the query by medoo?

where field_a <field_b - 1000

sourabhbajaj commented 6 years ago

$medoo->get('table','*',[ 'field_a'=>Medoo::raw('field_b') ]);