[insert_php]

$hostname= »triathlonv303.mysql.db »; //local server name default localhost
$username= »triathlonv303″; //mysql username default is root.
$password= »Greenday1″; //blank if no password is set for mysql.
$database= »triathlonv303″; //database name which you created

$con=mysql_connect($hostname,$username,$password);

if(! $con) {
die(‘Connection Failed’.mysql_error());
}

mysql_select_db($database,$con);
mysql_query(« SET NAMES UTF8 »);
echo’
‘;

echo ‘Número de participantes en las diferentes carreras : ‘;
echo’
‘;
echo’
‘;

$query = mysql_query(« SELECT COUNT(course) FROM inscrits_individuelle_licencie WHERE course=’Sprint’ and paiement=’effectuer' »);
while($rowtwo = mysql_fetch_array($query)){
$NSprintLicencie=$rowtwo[‘COUNT(course)’];
}

$query = mysql_query(« SELECT COUNT(course) FROM inscrits_individuelle_non_licencie WHERE course=’Sprint’ and paiement=’effectuer' »);
while($rowtwo = mysql_fetch_array($query)){
$NSprintNonLicencie=$rowtwo[‘COUNT(course)’];
}
$totalNSprint=$NSprintLicencie+$NSprintNonLicencie;

$query = mysql_query(« SELECT COUNT(course) FROM inscrits_individuelle_licencie WHERE course=’Découverte’ and paiement=’effectuer' »);
while($rowtwo = mysql_fetch_array($query)){
$NDecouverteLicencie=$rowtwo[‘COUNT(course)’];
}

$query = mysql_query(« SELECT COUNT(course) FROM inscrits_individuelle_non_licencie WHERE course=’Découverte’ and paiement=’effectuer' »);
while($rowtwo = mysql_fetch_array($query)){
$NDecouverteNonLicencie=$rowtwo[‘COUNT(course)’];
}
$totalNDecouverte=$NDecouverteLicencie+$NDecouverteNonLicencie;

$query = mysql_query(« SELECT COUNT(course) FROM inscrits_individuelle_licencie WHERE course=’Courte distance’ and paiement=’effectuer' »);
while($rowtwo = mysql_fetch_array($query)){
$NCourteDistanceLicencie=$rowtwo[‘COUNT(course)’];
}

$query = mysql_query(« SELECT COUNT(course) FROM inscrits_individuelle_non_licencie WHERE course=’Courte distance’ and paiement=’effectuer' »);
while($rowtwo = mysql_fetch_array($query)){
$NCourteDistanceNonLicencie=$rowtwo[‘COUNT(course)’];
}
$totalNCourteDistance=$NCourteDistanceLicencie+$NCourteDistanceNonLicencie;

$query = mysql_query(« SELECT COUNT(nomEquipe) FROM inscrits_membre_contre_la_montre WHERE paiement=’effectuer' »);
while($rowtwo = mysql_fetch_array($query)){
$NMembreCLM=$rowtwo[‘COUNT(nomEquipe)’];
}

$query = mysql_query(« SELECT COUNT(nomEquipe) FROM inscrits_relais WHERE paiement=’effectuer' »);
while($rowtwo = mysql_fetch_array($query)){
$NRelais=$rowtwo[‘COUNT(nomEquipe)’];
}

echo’
‘;
echo’
‘;

echo’ Hay ‘.$totalNSprint.’ participantes en la carrera Sprint. ‘;
echo’
‘;
echo’
‘;
echo’ Hay ‘.$totalNDecouverte.’ participantes en la Discovery Race. ‘;
echo’
‘;
echo’
‘;
echo’ Hay ‘.$totalNCourteDistance.’ participantes en la carrera de corta distancia. ‘;
echo’
‘;
echo’
‘;
echo’ Hay ‘.$NMembreCLM.’ participantes en la carrera contra reloj. ‘;
echo’
‘;
echo’
‘;
$placeRelais=$NRelais*3;
echo’ Hay ‘.$placeRelais.’ participantes en la carrera de relevos. ‘;
echo’
‘;
echo’
‘;
mysql_close($con);
echo’
‘;
echo’
‘;
echo ‘Aquí están los precios de las diferentes carreras (con o sin licencia): ‘;
[/insert_php]

SPRINTDESCUBRIMIENTOCORTA DISTANCIACONTRA RELOJRELEVOS
Licenciado = 25 €Licenciado = 20 €Licenciado = 35 €Con o sin licencia = 25 €Corta distancia = 60 €
Sin licencia = 30 €Sin licencia = 22 €Sin licencia = 55 €– – – – –Descubrimiento = 25 €
– – – – –– – – – –– – – – –– – – – –Carrera corta = 35 €