複数のデータベース テーブルからデータを取得し、5 つ以上のテーブルで選択クエリを使用して、トランザクション クエリを使用してパフォーマンスを向上させたいと考えています。
try {
// First of all, let's begin a transaction
$this->db->beginTransaction();
// Multiple select queries
$this->db->commit();
return $data;
} catch (Exception $e) {
// An exception has been thrown
// We must rollback the transaction
$this->db->rollback();
}