2014-03-07 08:13:41 +00:00

22 lines
456 B
PHP

<?php
class Application_Model_Commandes extends Zend_Db_Table_Abstract
{
protected $_name = 'commandes';
protected $_dependentTables = array(
'Application_Model_CommandesEven',
'Application_Model_CommandesPieces',
);
public function insert(array $data)
{
// Ajout d'un timestamp
if (empty($data['date_added'])) {
$data['date_added'] = date('Y-m-d H:i:s');
}
return parent::insert($data);
}
}