Modele pour la table Commandes dans la base Extraction

This commit is contained in:
Michael RICOIS 2011-10-27 15:26:45 +00:00
parent 747fa3e235
commit 7bf7d44975

View 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);
}
}