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(print_error('Database connection failure.', $e->getMessage())); } sql_row_obj::set_pdo_obj($S['pdo']); ?>