Skip to content

Instantly share code, notes, and snippets.

@kirkegaard
Created June 13, 2010 15:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save kirkegaard/436766 to your computer and use it in GitHub Desktop.
Save kirkegaard/436766 to your computer and use it in GitHub Desktop.
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