使用原生语句来写是可以如:select id,name,value,concat(name,',',value)as abc from 表名;这样是可以查出数据的
在tp5中,使用Db::name(表名)->field("id,name,value,concat(name,'--',value,)as abc")->select();报错
信息如下:
1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '",id)as path FROM `abc`