Search
 
SCRIPT & CODE EXAMPLE
 

PHP

php pdo error handling

$database -> errorInfo()[0] # SQLSTATE error code (a five characters alphanumeric identifier defined in the ANSI SQL standard).
$database -> errorInfo()[1] # Driver-specific error code.
$database -> errorInfo()[2] # Driver-specific error message.
Comment

pdo error message

try{
	//your pdo query here
}
catch(PDOException $e) {
	echo json_encode(array('Error'=>$e->getMessage()));
}
Comment

error pdo php Exception

// very simple explination .

try{
  codeA... }
catch(EXCEPTION $ex){
  codeB....

}

//the code in the block Catch excuted if there is an erro in the codeA in the block TRY

  
  
Comment

PREVIOUS NEXT
Code Example
Php :: encryption and decryption in php example 
::  
:: if file is not selected in file input type php 
::  
Php :: wordpress change slug programmatically 
Php :: check if custom post type exists 
Php ::  
Php :: lastinsertId php 
Php :: laravel model where in 
Php :: datatables 
Php :: transient wp 
::  
:: php buffer 
Php :: variables in php 
Php :: laravel has many limit 
:: how to add javascript to a php variable 
:: php multi elseif statement ternary 
Php :: A Livewire component was not found 
::  
Php :: how to check ia folder if no have files in php 
:: swagger laravel 
Php :: wp wc archive product page template 
:: php empy a file 
:: wpdb get column 
Php ::  
Php ::  
:: find in associative array php by property value 
Php :: php location header not working 
:: laravel get unique data by column and order by 
Php ::  
ADD CONTENT
Topic
Content
Source link
Name
5+3 =