-
Notifications
You must be signed in to change notification settings - Fork 0
TauDbServer
theyak edited this page Nov 6, 2012
·
6 revisions
The TauDbServer class is used in conjunction with the TauDb class to specify connection parameters to a database instance.
$server = new TauDbServer('database-name', 'username', 'password');
$db = TauDb::init('mysql', $server);
$server = new TauDbServer();
$server->database = 'database-name';
$server->username = 'username';
$server->password = 'password';
$server->host = 'db.example.com';
$server->port = 90;
$db = TauDb::init('mysql', $server);
<tr>
<td>$username</td>
<td>Username for database</td>
<td>root</td>
</tr>
<tr>
<td>$password</td>
<td>Password for database</td>
<td></td>
</tr>
<tr>
<td>$host</td>
<td>Host server for database</td>
<td>127.0.0.1</td>
</tr>
<tr>
<td>$port</td>
<td>Port for database server</td>
<td>
0 (Each engine will define its default port if 0 is used. e.g., MySQL will use port 3306.)
</td>
</tr>
</tbody>
Variable | Description | Default |
---|---|---|
$database | Name of default database to use |
__construct($database, $username, $password, $host, $post)
All parameters correspond the properties listed above. All are optional and will use the defaults as indicated above if not supplied.