$data = (new \yii\db\Query())
            ->select(['user.id','user.username','user.imgs','pet.id as pet_id','pet.pet_name','pet.pet_birth_time','pet.pet_sex','pet.wechat','pet.message','pet.pet_imgs','pet.phone','pet_category.cate_name','pet.address','city.city_name','user.sex','user.birth_time'])
            ->from('pet')
            ->where(['like','ewm_url',$ewm])
            ->leftJoin('user','pet.user_id = user.id')
            ->leftJoin('city','user.city_id = city.city_id')
            ->leftJoin('pet_category','pet.pet_category=pet_category.id')
            ->one();

 

相关文章:

  • 2022-12-23
  • 2022-01-05
  • 2022-12-23
  • 2021-04-28
  • 2021-12-09
  • 2022-12-23
  • 2022-12-23
  • 2021-07-26
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-29
  • 2021-10-21
相关资源
相似解决方案