Method: ::getArbitraryDatabase($engine , $host , $name , $user , $pass)

Public static method of the InvDB singleton. Attempts to make a connection using the parameters specified and returns a database connection object, or returns false on failure.

Arguments:

$engine (STRING) - connection engine to be used (usually 'mysql'),
$host (STRING) - hostname or host IP
$name (STRING) - database name
$user (STRING) - username
$password (STRING) - password

Returns:

OBJECT/FALSE

Example:

$shoedb = InvDB::getArbitraryDatabase('mysql' , '123.123.123.123' ,'shoedb' , 'shoecollector' , '1AmAs80E');

Contact Us

Address: 22a Fishergate York, YO10 4AB · Tel: 01904 636677 · Email: info@dotadmin.com