Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

php new PDO timeout

$DBH = new PDO(
    "mysql:host=$host;dbname=$dbname", 
    $username, 
    $password,
    array(
        PDO::ATTR_TIMEOUT => 5, // in seconds
        PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION
    )
);
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #php #PDO #timeout
ADD COMMENT
Topic
Name
2+8 =