Correction affichage date
This commit is contained in:
parent
d361a0feb0
commit
d4f49253d1
@ -109,21 +109,21 @@ class DashboardController extends Zend_Controller_Action
|
|||||||
foreach($rows->toArray() as $item)
|
foreach($rows->toArray() as $item)
|
||||||
{
|
{
|
||||||
$info = array(
|
$info = array(
|
||||||
'id' => $item['id'],
|
'id' => $item['id'],
|
||||||
'reference' => $item['reference'],
|
'reference' => $item['reference'],
|
||||||
'dateCriteres' => $item['dateAjout'],
|
'dateCriteres' => $item['dateAjout'],
|
||||||
);
|
);
|
||||||
//Recherche des comptages
|
//Recherche des comptages
|
||||||
$sql = $comptagesM->select()
|
$sql = $comptagesM->select()
|
||||||
->from($comptagesM, array('resultat', 'uniteInsee', "DATE_FORMAT(dateAjout, '%d/%m/%Y %H:%i:%s') as dateAjout"))
|
->from($comptagesM, array('resultat', 'uniteInsee', "DATE_FORMAT(dateAjout, '%d/%m/%Y %H:%i:%s') as dateAjoutF"))
|
||||||
->where('idDefinition = ?', $item['id'])
|
->where('idDefinition = ?', $item['id'])
|
||||||
->order('dateAjout DESC')->limit(1);
|
->order('dateAjout DESC')->limit(1);
|
||||||
$comptage = $comptagesM->fetchAll($sql)->toArray();
|
$comptage = $comptagesM->fetchAll($sql)->toArray();
|
||||||
|
|
||||||
if (count($comptage)>0){
|
if (count($comptage)>0){
|
||||||
$info['resultat'] = $comptage[0]['resultat'];
|
$info['resultat'] = $comptage[0]['resultat'];
|
||||||
$info['uniteInsee'] = $comptage[0]['uniteInsee'];
|
$info['uniteInsee'] = $comptage[0]['uniteInsee'];
|
||||||
$info['dateComptage'] = $comptage[0]['dateAjout'];
|
$info['dateComptage'] = $comptage[0]['dateAjoutF'];
|
||||||
}
|
}
|
||||||
|
|
||||||
$results[] = $info;
|
$results[] = $info;
|
||||||
|
Loading…
Reference in New Issue
Block a user