Exemple #1
0
(
 [Variable_name] => Ssl_cipher
 [Value] => DHE-RSA-AES256-SHA
)
* otherwise
Array
(
 [Variable_name] => Ssl_cipher
 [Value] =>
)
*/
/**
 * example using a socket for the connection
 *
 * charset: utf8
 * user: $user
 * password: $password
 * socket path: /tmp/mysql.sock
 * database: dalmp
 */
$db = new DALMP\Database("utf8://{$user}:{$password}" . '@unix_socket=\\tmp\\mysql.sock/dalmp');
$db->debug(1);
try {
    echo PHP_EOL, 'example using unix_socket: ', $db->getOne('SELECT NOW()'), PHP_EOL;
} catch (\Exception $e) {
    print_r($e->getMessage());
}
echo $db;
// will print: DALMP :: connected to: db4, Character set: utf8, Localhost via UNIX socket,...
# -----------------------------------------------------------------------------------------------------------------
echo PHP_EOL, str_repeat('-', 80), PHP_EOL, 'Time: ', $timer->getPageLoadTime(), ' - Memory: ', $timer->getMemoryUsage(1), PHP_EOL, str_repeat('-', 80), PHP_EOL;