Concurs interdisciplinar de matematică în limbi străine "Mathmoiselle"
ediţia a VII-a


"; echo "\n"; $query="SELECT distinct clasa from participanti order by length(clasa), clasa"; $result=mysql_query($query,$conn); $cateRanduri=mysql_num_rows($result); printf("

Clasa "); $query="SELECT distinct judet from participanti order by judet"; $result=mysql_query($query,$conn); $cateRanduri=mysql_num_rows($result); printf("

Localitate "); $query="SELECT distinct institutie from participanti order by institutie"; $result=mysql_query($query,$conn); $cateRanduri=mysql_num_rows($result); printf("

Scoala "); echo "

"; echo ""; $query_string=""; if ($institutie<>"0") $query_string=" and institutie='".$institutie."' "; if ($judet<>"0") $query_string=$query_string.'and judet="'.$judet.'" '; if($clasa<>"0") $query_string=$query_string.'and clasa="'.$clasa.'" '; $query='SELECT nume, limba, institutie,judet, nota, premiu, clasa FROM participanti where 1=1 '.$query_string.' order by length(clasa), clasa, nota desc, nume'; $result=mysql_query($query,$conn); $cateRanduri=mysql_num_rows($result); mysql_close($gmb); if($clasa<>"0") echo '

Clasa: '.$clasa.'

'; if ($judet<>"0") echo '

Localitatea: '.$judet.'

'; if ($institutie<>"0") echo '

Scoala: '.$institutie.'

'; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; //tabelul in care pune tot; $crt=0; for($i=0;$i<$cateRanduri;$i++) //initial cateranduri=0; si nu intra aici; { $nume=""; $limba=""; $scoala=""; $judet=""; $clasa=""; $nume=mysql_result($result,$i,0); $limba=mysql_result($result,$i,1); $scoala=mysql_result($result,$i,2); $judet=mysql_result($result,$i,3); $nota=mysql_result($result,$i,4); $premiu=mysql_result($result,$i,5); $clasa=mysql_result($result,$i,6); $crt=$crt+1; if ($nota==-1) $nota="Abs."; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; } printf("
Nr.NumeLimbaClasaScoalaLocalitateNotaPremiu
'.$crt.'. '.strtoupper($nume).''.strtolower($limba).' '.$clasa.' '.$scoala.''.$judet.' '.$nota.' '.$premiu.'
"); mysql_close($conn); ?>