Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

DB::transaction

DB::beginTransaction();

try {
    DB::insert(...);
    DB::insert(...);
    DB::insert(...);

    DB::commit();
    // all good
} catch (Exception $e) {
    DB::rollback();
    // something went wrong
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged:
ADD COMMENT
Topic
Name
1+8 =