Lines Matching refs:db1
20 $db1 = new PDO($dsn, $user, $pass, array(PDO::ATTR_PERSISTENT => true));
22 $db1->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_SILENT);
24 $db1->exec('SET @pdo_persistent_connection=1');
30 $stmt = $db1->query('SELECT CONNECTION_ID() as _con1');
41 $db1 = NULL; /* should be equal to closing to my understanding */
42 $db1 = new PDO($dsn, $user, $pass, array(PDO::ATTR_PERSISTENT => true));
43 $db1->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_SILENT);
44 $stmt = $db1->query('SELECT CONNECTION_ID() as _con1');
51 $affected = $db1->exec(sprintf('KILL %d', $con1));
54 if ('00000' == $db1->errorCode()) {
56 @$db1->exec("SET @pdo_persistent_connection=2");
58 if ('HY000' != $db1->errorCode())
59 printf("[004] Wrong error code %s\n", $db1->errorCode());
61 $tmp = implode(' ', $db1->errorInfo());
66 $db1 = new PDO($dsn, $user, $pass, array(PDO::ATTR_PERSISTENT => false));
67 $db1->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_SILENT);
68 $stmt = $db1->query('SELECT CONNECTION_ID() as _con1');
96 (is_object($db1)) ? $db1->errorCode() : 'n/a',
97 (is_object($db1)) ? implode(' ', $db1->errorInfo()) : 'n/a',