<?php
$sqlenergie = "SELECT fer_on,or_on,exfer_on,exor_on,ada_on,ura_on,exfer_energie,exor_energie,fer_energie,or_energie,ada_energie,ura_energie FROM matgraph_users WHERE id='$planete' ";
$resenergie = db_mysql_Query($sqlenergie)or die('erreur sql<br>'.$sqlenergie.'<br>'.mysql_error());
$rowenergie = mysql_fetch_array($resenergie); 


$Total_energie_consom = $rowenergie[fer_energie] + $rowenergie[or_energie] + $rowenergie[exfer_energie] + $rowenergie[exor_energie] + $rowenergie[ada_energie] + $rowenergie[ura_energie] ;
$Total_energie_reste =  round(($New_central_energie + $New_fission_energie + $Total_energie_consom),0);
$Total_energie_prod = round(($New_central_energie + $New_fission_energie),0);
$Total_energie_reste2 =  number_format(round(($New_central_energie + $New_fission_energie + $Total_energie_consom),0), 0, ',', ' ');
$Total_energie_prod2 = number_format(round(($New_central_energie + $New_fission_energie),0), 0, ',', ' ');

?>
