catfan / Medoo

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

Bug: Medoo::raw() Table name not evaluated #958

Closed BrainStormDevel closed 3 years ago

BrainStormDevel commented 3 years ago

I have problem when using raw method to select. The and inside this query are not evaluated as tables.

Information

Detail Code $db->debug()->select('tablename', [ 'test' => Medoo::raw("CONCATWS('',, DATE_FORMAT(, '%Y-%m-%d'), 'fixedtext')"), ]);

Expected output SELECT CONCATWS('',tablename.column1, DATE_FORMAT(tablename.column2, '%Y-%m-%d'), 'fixedtest') AS test FROM tablename

catfan commented 3 years ago

Fixed it on 73f9220.