Sado Connection Object Documentation

The Sado connection object controls all communication with the database. The connection object can be used to query the database and complete tasks like selects, inserts, updates and calling stored procedures.

To start using the connection object, include the bootstrap file and set an instance of the object: require_once 'lib/Sado/sado.bootstrap.php';

// set instance of object
$db = &SadoFactory::getInstance();

// here would be how to set instance of connection #2 (if it is setup)
// $db = &SadoFactory::getInstance(2);Now we can start using the connection object. Here are the connection object methods and properties explained: // ping the server to test for a valid connection
if($db->ping())
{
echo 'good connection';
}
else
{
echo 'bad connection';
}

// get the instance ID for an instance
$instance_id = $db->getInstanceId();