Correction Fetch Object
This commit is contained in:
parent
cc723e5006
commit
7308c81bad
@ -23,7 +23,8 @@ class Application_Model_Commandes extends Zend_Db_Table_Abstract
|
||||
}
|
||||
if (!empty($etat)){
|
||||
$sql->where('statutCommande = ?', $etat);
|
||||
}
|
||||
}
|
||||
$this->getAdapter()->setFetchMode(Zend_Db::FETCH_OBJ);
|
||||
$result = $this->getAdapter()->fetchAll($sql);
|
||||
return $result;
|
||||
}
|
||||
@ -31,6 +32,7 @@ class Application_Model_Commandes extends Zend_Db_Table_Abstract
|
||||
public function getCommandesById($id)
|
||||
{
|
||||
$sql = $this->select()->where('idCommande = ?', $id);
|
||||
$this->getAdapter()->setFetchMode(Zend_Db::FETCH_OBJ);
|
||||
$result = $this->getAdapter()->fetchAll($sql);
|
||||
return $result;
|
||||
}
|
||||
@ -40,6 +42,7 @@ class Application_Model_Commandes extends Zend_Db_Table_Abstract
|
||||
$sql = $this->select()
|
||||
->where('siren = ?', $siren)
|
||||
->order('dateCommande ASC');
|
||||
$this->getAdapter()->setFetchMode(Zend_Db::FETCH_OBJ);
|
||||
$result = $this->getAdapter()->fetchAll($sql);
|
||||
return $result;
|
||||
}
|
||||
@ -53,7 +56,7 @@ class Application_Model_Commandes extends Zend_Db_Table_Abstract
|
||||
->where('login = ?', $login)
|
||||
->order('dateCommande ASC')
|
||||
->where('dateCommande LIKE ?', $dateDebut.'%');
|
||||
|
||||
$this->getAdapter()->setFetchMode(Zend_Db::FETCH_OBJ);
|
||||
$result = $this->getAdapter()->fetchAll($sql);
|
||||
return $result;
|
||||
}
|
||||
|
@ -15,6 +15,7 @@ class Application_Model_CommandesKbis extends Zend_Db_Table_Abstract
|
||||
$sql->where('type = ?', $mode);
|
||||
}
|
||||
$sql->order('dateCommande ASC');
|
||||
$this->getAdapter()->setFetchMode(Zend_Db::FETCH_OBJ);
|
||||
$result = $this->getAdapter()->fetchAll($sql);
|
||||
return $result;
|
||||
}
|
||||
@ -23,6 +24,7 @@ class Application_Model_CommandesKbis extends Zend_Db_Table_Abstract
|
||||
{
|
||||
$sql = $this->select()
|
||||
->where('id = ?', $id);
|
||||
$this->getAdapter()->setFetchMode(Zend_Db::FETCH_OBJ);
|
||||
$result = $this->getAdapter()->fetchAll($sql);
|
||||
return $result;
|
||||
}
|
||||
@ -32,6 +34,7 @@ class Application_Model_CommandesKbis extends Zend_Db_Table_Abstract
|
||||
$sql = $this->select()
|
||||
->where('siren = ?', $siren)
|
||||
->order('dateCommande ASC');
|
||||
$this->getAdapter()->setFetchMode(Zend_Db::FETCH_OBJ);
|
||||
$result = $this->getAdapter()->fetchAll($sql);
|
||||
return $result;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user