catfan / Medoo

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

where RAW #891

Closed Sgenmi closed 4 years ago

Sgenmi commented 4 years ago

$where=[ 1=>\Medoo\Medoo::raw('MOD(,2)') ] Version: 1.7.8 line: 643 code: is_int($key) &&

is_int($key) && !is_object($value) &&

catfan commented 4 years ago

Would you provide more detailed information what the problem is?

If you just using raw object as where parameter, there is no need to put it into array.

$data = $database->select('account', [
    'user_id',
    'email'
], Medoo::raw('WHERE LENGTH(<user_name>) > 5')
);