メインカテゴリーを選択しなおす
<?php namespace App\Models; use CodeIgniter\Model; class Table1 extends Model { protected $table = 'table1'; public function getExample() { $subQuery = $this->db->table('table2') ->select('table2.column') ->where('column', 1) ->getCompiledSelect(); $this->db->table($this->table) ->join("{$subQuery} …