Modele pour la table Commandes dans la base Extraction
This commit is contained in:
parent
747fa3e235
commit
7bf7d44975
16
application/models/ExtractionCommandes.php
Normal file
16
application/models/ExtractionCommandes.php
Normal file
@ -0,0 +1,16 @@
|
||||
<?php
|
||||
class Application_Model_ExtractionCommandes extends Zend_Db_Table_Abstract
|
||||
{
|
||||
protected $_name = 'commandes';
|
||||
|
||||
public function insert(array $data)
|
||||
{
|
||||
// Ajout d'un timestamp
|
||||
if (empty($data['dateAdded'])) {
|
||||
$data['dateAdded'] = date('Y-m-d H:i:s');
|
||||
}
|
||||
return parent::insert($data);
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user