2021-02-01から1ヶ月間の記事一覧
Config の api.success.data キー は \Crud\Listener\ApiListener::_ensureData で参照される https://github.com/FriendsOfCake/crud/blob/master/src/Listener/ApiListener.php#L231 以下の指定方法がある api.success.data.row api.success.data.subject …
// logs/queries.log にクエリログを出力 $connection->enableQueryLogging(true); コントローラ内であれば、こんな感じ $this->テーブル名->getConnection()->enableQueryLogging(); ※3.x では $this->テーブル名->getConnection()->logQueries(true); だっ…
note CakePHP の場合は、app/webroot/index.php の先頭と最後に下記のコードを差し込んで確認した https://www.php.net/manual/ja/function.memory-get-usage.php https://www.php.net/manual/ja/function.memory-get-peak-usage.php //ini_set('memory_limi…
※2022/02/05: 追記 (->toArray() する際の注意点) ドキュメント クエリービルダー - テーブルから行を取得する TableClass->find()...->all() では ResultSet が返り、ResultSet を foreach で回すと PDOStatement::fetch しDBから取得したデータがメモリ上…