在模型内使用一对一或者一对多关联并对被关联模型进行条件查询

public function getcover(){
        return $this->hasMany("Comments","cid","id")->where("status", "=", "1");
    }

Thinkphp

1 条评论

  1. fasfas
    2020-06-18 17:29
    回复

    asfasfs

添加新评论