Search
 
SCRIPT & CODE EXAMPLE
 

PHP

how to stop a query if query after it is not inserted in laravel

try {
        //start the transaction
        DB::beginTransaction();

        DB::table('XYZ')->update(['abc'=>'ABC']);
        DB::table('EG')->delete();

        //commit the transaction
        DB::commit();
} catch (Exception $e) {
        DB::rollBack();
        return response;
}
Comment

PREVIOUS NEXT
Code Example
Php :: how to color php text 
Php :: form alter drupal 9 language code 
Php :: check website ssl certificate using php openssl_x509_parse 
Php :: mysqldump is not recognized as an internal or external command laravel 
Php :: what is the mixmam size that php can take 
Php :: how to add in massive php 
Php :: validation ignored rules 
Php :: laravel where has relation 
Php :: if condition in laravel blade in select option 
Php :: powerpack add custom image size 
Php :: Laravel 8 Factory - One To Many (Polymorphic) Relationship 
Php :: vendor folder command for custom errors laravel 
Php :: Autoriser les contributeurs à télécharger des images 
Php :: how to upload images to sql database php PDO 
Php :: laravel framework 
Php :: read an email with php 
Php :: yii framework 
Php :: laravel jobs tutorial 
Php :: last insert id in laravel 
Php :: error logs wp 
Php :: return true false laravel 
Php :: Apache/2.4.46 (Win64) OpenSSL/1.1.1j PHP/7.3.27 Server at localhost Port 80 
Java :: jlabel text center 
Java :: how to loop javafx media player 
Java :: how to create a button with javascri[t 
Java :: android studio lower case letters on a button 
Java :: recyclerview dependency java android 
Java :: how to get an array as input in java 
Java :: print list in java 8 
Java :: how to stop screen rotation in android code 
ADD CONTENT
Topic
Content
Source link
Name
5+4 =