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 use medoo row in column name where cluase #725

Closed HASSANDL closed 6 years ago

HASSANDL commented 6 years ago

hello, Is correct this code?

$database->get('account', [
    'user_name',
    'user_id' 
], [
    Medoo::raw('LEN(<experience>)') => 100
]);
SELECT "user_name", "user_id"
FROM "account"
WHERE LEN("experience") = 100
catfan commented 6 years ago

You can not assign raw object (or any PHP objects) as key of array in PHP language.

But it will be supported for next version of Medoo with new design method.

ThisIsntMyId commented 3 years ago

is this supported yet? i want to use mysql's JSON_OVERLAP function inside where clause but the problem is that the where part of the query is ready dynamic and build from somewhere else.

kingkong19 commented 8 months ago

hey, this possible now?