Ajout model table commandes_erreur
This commit is contained in:
parent
e0078d7b70
commit
aacb190b86
18
application/models/CommandesErreur.php
Normal file
18
application/models/CommandesErreur.php
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
<?php
|
||||||
|
class Application_Model_CommandesErreur extends Zend_Db_Table_Abstract
|
||||||
|
{
|
||||||
|
protected $_name = 'commandes_erreur';
|
||||||
|
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
if (empty($config) && Zend_Registry::isRegistered('configuration')){
|
||||||
|
$configuration = Zend_Registry::get('configuration');
|
||||||
|
$this->_db = Zend_Db::factory($configuration->databases->db->sdv1);
|
||||||
|
} elseif(empty($config)){
|
||||||
|
$dbConfig = new Zend_Config_Ini(APPLICATION_PATH.'/configs/configuration.ini', 'databases');
|
||||||
|
$this->_db = Zend_Db::factory($dbConfig->db->sdv1);
|
||||||
|
}
|
||||||
|
$this->_db->setFetchMode(Zend_Db::FETCH_OBJ);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user