私は2つのテーブルの顧客と顧客計画を持っています
顧客テーブルID名1John2 Deol 3 test3 4 test4
カスタマープランテーブルidcust_idstatus 1 2 0 2 3 1 3 4 1
すべての顧客IDを取得したいのですが、プランID(存在する場合)を実行してすべてのデータを取得します
$criteria->join ='where t.id NOT IN (select cust_id from customer_plan) or t.id in (select customer_id from customer_plan where foblu_customer_plan.babytel_status = 0)';
これにより、顧客テーブルのIDを取得しますが、両方のテーブルの一意のIDを取得したい