1 2 3 4 5 6 7 8
<?php try { $S['pdo']=new PDO('mysql:dbname='.$S['conf']['sqldb'].';host='.$S['conf']['sqlhost'], $S['conf']['sqluser'], $S['conf']['sqlpass'], array(PDO::ATTR_PERSISTENT => true)); } catch (Exception $e) { die('Database connection failure: '.$e->getMessage()."\n"); } sql_row_obj::set_pdo_obj($S['pdo']); ?>