yii2 ActiveRecord 层 生成的 sql 语句自动 添加 反引号导致执行失败

处理方式2种

1. 直接执行  纯 sql 语句

2. 将 sql 自动加的  反引号 去掉

去掉的处理

注意 : $field  生成的 sql 带 反引号的处理

1. 数组的形式

2.  用 Expression()

参考资料 :

https://www.yidianphp.com/archives/905

https://www.yiichina.com/topic/656

猜你喜欢

转载自blog.csdn.net/qq_34228881/article/details/83744282