$subQuery = $model::query()
    ->from('table1 as a')
    ->getQuery();
$query = $model::query()
    ->from('table2 as b')
    ->joinSub($subQuery, 'sub', 'sub.id', '=', 'b.id');
View Code

相关文章:

  • 2022-12-23
  • 2021-08-15
  • 2021-06-28
  • 2022-12-23
  • 2021-07-13
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-12-18
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案