catfan / Medoo

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

In the league table in the query using mysql functions and alias #501

Closed liulei-web closed 6 years ago

liulei-web commented 7 years ago

select a.case_id,a.name,a.gender,a.age_type,a.age_type,a.age,a.create_time,a.update_time,ifnull(b.pic_url,'xxxxx') as cover from tbl_case_base_info a left join tbl_case_card b on a.case_id = b.case_id where a.user_id = 1 and a.org_id =1 group by a.case_id order by a.create_time desc limit 0,30

how should I do with Medoo in a query ?

catfan commented 6 years ago

Check out the new feature raw object https://medoo.in/api/raw.

liulei-web commented 3 years ago

good job