2011-09-29 15:15:14 +00:00

29 lines
761 B
PHP

<?php
class Application_Model_Aide extends Zend_Db_Table_Abstract
{
protected $_name = 'aide';
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);
}
}
/**
* Enter description here ...
* @param array $keys
*/
public function texte($methode, $keys)
{
$sql = $this->select()
->where('methode = ?', $methode)
->where('champ IN ?', $keys);
return $this->fetchAll($sql);
}
}