My current system is using Zend Framework 1, and works very well with our local MySQL server. However, I now need to access another server for importing/exporting. I'm using a class extended from zend_db_table_abstract in order to query the necessary table.
class Model_Db_ExportData extends Zend_Db_Table_Abstract{
protected $_name;
protected $_schema;
}
I instantiate name and schema when I create the object
$export = new Model_Db_ExportData(array('name' => $this->exportTable, 'schema' => $this->db));
EDIT From what I can gather, zend_db_table isn't the place to define the host, since it only affects tables. However, I'm still unable to figure out where I can define a host outside of configs. EDIT
How do I specify a separate server from the one defined in my configs? Do I need to use custom configuration files for this code? The Zend_Db_Table_Abstract documentation wasn't very helpful, although it's quite large and I could have easily missed something. Any help is very much appreciated.
There are at least 2 possible ways to accomplish what you want: