Skip to content
Payton Bice edited this page Feb 19, 2016 · 1 revision

To connect to your database, create an instance of p810\MySQL\Connection with your log in credentials. If connection failed, an exception (p810\MySQL\Exceptions\MySQLConnectionException) is thrown.

<?php

use p810\MySQL\Connection;

$db = new Connection('username', 'password', 'database');

Note: The default host address is 127.0.0.1. You may pass a fourth argument to the constructor of Connection to override this.

Clone this wiki locally