From 99ebc365fd8b96765e5ef8545e4c93f7b772bcf4 Mon Sep 17 00:00:00 2001 From: Michael RICOIS Date: Mon, 5 Mar 2012 15:47:31 +0000 Subject: [PATCH] Correction --- batch/setMinMax.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/batch/setMinMax.php b/batch/setMinMax.php index 37704999..7b18042f 100644 --- a/batch/setMinMax.php +++ b/batch/setMinMax.php @@ -71,14 +71,11 @@ if ( !$db->query($sql) ) { foreach($keys as $key) { //Lecture - echo $sql = 'SELECT MIN('.$key.') AS min, MAX('.$key.') AS max FROM etablissements_act'; + $sql = 'SELECT MIN('.$key.') AS min, MAX('.$key.') AS max FROM etablissements_act'; //$dbMetier->setFetchMode(Zend_Db::FETCH_ASSOC); $stmt = $dbMetier->query($sql); $result = $stmt->fetchObject(); - print_r($result); - exit; - //Insertion $data = array( 'cle' => $key, @@ -87,6 +84,6 @@ foreach($keys as $key) { ); $db->insert('minmax', $data); - if ($opts->manuel) print($key.'-> min:'.$result['min'].' max:'.$result['max']."\n"); + if ($opts->manuel) print($key.'-> min:'.$result->min.' max:'.$result->max."\n"); } if ($opts->manuel) print('Terminé');