Connects one or more MySQL databases in your PHP application
PHP 5 or higher, MySQL or MariaDB
require_once './[PATH-TO-FILE]/MysqlConnector.php';Replace [PATH-TO-FILE] with your path to this file
$config = array(
'host' => 'hostname or ip',
'user' => 'database-user',
'pass' => 'database-user-password',
'database' => 'database-name',
);$db = new MysqlConnector();$db->connect($config['host'], $config['user'], $config['pass'], $config['database']);$query_results = $db->query('SELECT column_a, column_b AS column_d, column_c FROM table');$my_escaped_string = $db->get_escaped_string($string);$db->close();This bundle is under the MIT license.