cakephpを使ってデータベースからデータを取ってくる際のコードで、JOINをした後SQL文でのWHEREやORやANDはこのような場合どこにどう追記をしたらいいのか教えてください、よろしくお願いします
<?php namespace App\Controller; use App\Controller\AppController; class AcceptOrderController extends AppController { public function index() { $query = $this->AcceptOrder->find() ->join([ 'table' => 'customer', 'alias' => 'c', 'type' => 'INNER', 'conditions' => 'c.id = AcceptOrder.customer_id', ])->select([ 'id' => 'AcceptOrder.id', 'customer_name' => 'c.customer_name', 'product_id' => 'AcceptOrder.product_id', 'quantity' => 'AcceptOrder.quantity', $this->set('acceptOrder', $query); } }

下記のような回答は推奨されていません。
このような回答には修正を依頼しましょう。
また依頼した内容が修正された場合は、修正依頼を取り消すようにしましょう。
2022/08/01 03:24
退会済みユーザー
2022/08/01 03:32
2022/08/01 03:44
退会済みユーザー
2022/08/01 04:10