Correction

This commit is contained in:
Michael RICOIS 2012-03-05 15:47:31 +00:00
parent b7185d60c3
commit 99ebc365fd

View File

@ -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é');