Zend Framework model

If you want to enable model to use another than default databas connection, here is a tip:

class Custom extends Zend_Db_Table {

	protected $_name = "custom";

	public function __construct($config = array()) {
		$c = Zend_Registry::get('config');
		$db = Zend_Db::factory($c->db->local->adapter,
$c->db->local->config->toArray());
		parent::__construct($db);
	}
}