Answers for "php new PDO timeout"

PHP
0

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
    )
);
Posted by: Guest on August-24-2020

Browse Popular Code Answers by Language