Horje
php pdo setting error modes Code Example
php pdo setting error modes
// there are three supported ways of handing errors 
// 1. PDO::ERROR_SILENT ->PDO sets an error code
// 2. ERRMODE_WARNING   -> set an error code and warning message
// 3. PDO::ERRMODE_EXCEPTION -> error  and exception
// To set the error handling strategy, you can pass an associative array 

// there are two ways to set the error modes 
//to the PDO constructor like this:
$pdo = new PDO($dsn, $user, $password, [PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION]);

//Or you can use the setAttribute() method of the PDO instance:
$pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);




Php

Related
uft8 json php Code Example uft8 json php Code Example
Laravel: customize or extend notifications - database model Code Example Laravel: customize or extend notifications - database model Code Example
get last name user Code Example get last name user Code Example
php slice array in half Code Example php slice array in half Code Example
delete folder laravel Code Example delete folder laravel Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
9