This method, as the name suggests, changes the current database. For example:
<?php $result = $db->setDatabase('myDatabase'); ?>