Skip to content
Snippets Groups Projects

Draft: Bug 421727 - Use mysqli extension instead

Closed Christopher Guindon requested to merge cguindon/master/change-2002-5 into master
33 files
+ 1833
804
Compare changes
  • Side-by-side
  • Inline
Files
33
 
<?php
 
/**
 
* Copyright (c) 2017 Eclipse Foundation and others.
 
*
 
* This program and the accompanying materials are made
 
* available under the terms of the Eclipse Public License 2.0
 
* which accompanies this distribution, and is available
 
* at http://eclipse.org/legal/epl-2.0
 
*/
 
 
namespace EclipseFdn\DatabaseConnection\Driver;
 
 
use EclipseFdn\DatabaseConnection\DatabaseConnection;
 
 
class DatabaseConnection_mysql extends DatabaseConnection {
 
 
/**
 
* Connect to MySQL database with PDO
 
*
 
*/
 
public function __construct($connection_options) {
 
$this->connectionOptions = $connection_options;
 
 
$dsn = 'mysql:host=' . $connection_options['host'] . ';port=3306';
 
$dsn .= ';dbname=' . $connection_options['database'];
 
 
parent::__construct($dsn, $connection_options['username'], $connection_options['password']);
 
}
 
}
 
\ No newline at end of file
Loading