Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
resources.db.adapter = "PDO_MYSQL"
resources.db.params.dbname = "zfpress_production"
resources.db.params.username = "root"
resources.db.params.password = "root"
resources.db.params.prefix = "zfpress_"
<?php
class ZFPress_Model_DbTable_Abstract
extends Zend_Db_Table_Abstract
{
protected $_prefix = '';
public function init()
{
$options = $this->getAdapter()->getConfig();
if(isset($options['prefix'])) {
$this->_name = $options['prefix'] . $this->_name;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment