2011-05-11 14:16:42 +00:00
|
|
|
<?php
|
|
|
|
class Application_Model_Commandes extends Zend_Db_Table_Abstract
|
|
|
|
{
|
|
|
|
protected $_name = 'commandes';
|
2011-06-27 16:08:18 +00:00
|
|
|
|
|
|
|
public function getCommandesById($id)
|
|
|
|
{
|
|
|
|
$sql = $this->select()->where('idCommande = ?', $id);
|
|
|
|
$result = $this->getAdapter()->fetchAll($sql);
|
|
|
|
return $result;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getCommandesBySiren($siren)
|
|
|
|
{
|
|
|
|
$sql = $this->select()
|
|
|
|
->where('siren = ?', $siren)
|
|
|
|
->order('dateCommande ASC');
|
|
|
|
$result = $this->getAdapter()->fetchAll($sql);
|
|
|
|
return $result;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getCommandesByLogin($login)
|
|
|
|
{
|
|
|
|
$sql = $this->select()
|
|
|
|
->where('login = ?', $login)
|
|
|
|
->order('dateCommande ASC');
|
|
|
|
$result = $this->getAdapter()->fetchAll($sql);
|
|
|
|
return $result;
|
|
|
|
}
|
|
|
|
|
2011-05-11 14:16:42 +00:00
|
|
|
}
|