Correction

This commit is contained in:
Michael RICOIS 2016-02-17 06:50:54 +00:00
parent 550ffe4af0
commit 4b3b83007f

View File

@ -103,7 +103,7 @@ if ($stock) {
$result = $db->fetchRow($sql, null, Zend_Db::FETCH_ASSOC);
$lastInsert = $result['lastInsert'];
}
echo date('Y/m/d - H:i:s') ." - Derniere MAJ des postes des bilans : $lastInsert".EOL;
echo date('Y/m/d - H:i:s') ." - Derniere MAJ des postes des bilans : $lastInsert_n";
// --- Date Intervalle
if ( $lastInsert && intval($nbMois)>0 ) {
@ -113,12 +113,12 @@ if ($stock) {
->add($nbMois, Zend_Date::MONTH)
->subSecond(1);
$toInsert = $date->toString('yyyy-MM-dd');
echo date('Y/m/d - H:i:s') ." - jusqu'au $toInsert".EOL;
echo date('Y/m/d - H:i:s') ." - jusqu'au $toInsert\n";
}
if ( $toInsert === null ) {
$sql = $db->select()->from('bilans', array(new Zend_Db_Expr('DISTINCT siren AS siren')), 'jo')
->where('dateInsert >= '.$lastInsert);
->where('dateInsert >= ?', $lastInsert);
if (!empty($sirenReprise)) {
$sql->where('siren >= ?', $sirenReprise);
}