TP6针对join和find为啥必须要使用where

浏览:831 发布日期:2021/04/07 分类:ThinkPHP6专区 关键字: tp6 join find
发现tp6使用join()+find()的查询结果为null,查看find源码,好像必须需要where,tp3是不需要where就可以用find的,

而且不是说join配上where会影响查询性能吗?为啥tp6要做这样的修改呢

find源码内容如下:
if (empty($this->options['where']) && empty($this->options['order'])) {
$result = [];
} else {
$result = $this->connection->find($this);
}
最佳答案
评论( 相关
后面还有条评论,点击查看>>