catfan / Medoo

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

Request : update GROUP accept array #333

Closed touchweb-vincent closed 7 years ago

touchweb-vincent commented 8 years ago

Hello,

Dealing with this, may avoid direct query usage :

$db->select('customer', '*', array('GROUP' => array('foreign1_id', 'foreign2_id' ,'foreign3_id')));

If you could add this support, it would sounds good to me.

Thank you :)

Regards, Vincent

SyuTingSong commented 8 years ago

Seems useful.

$db->select('customer', '*', array('GROUP' => array('foreign1_id', 'foreign2_id' ,'foreign3_id')));

Creates query

SELECT * FROM "customer" GROUP BY "foreign1_id", "foreign2_id", "foreign3_id"
catfan commented 7 years ago

Supported on Medoo 1.4.