info@rcaspa.be

Records

[insert_php]

global $wpdb;

$cat = ‘tc’;
$sexe = ‘h’;
$table = ‘RCA-record’.$cat.$sexe;
$epreuveQuery = “SELECT * FROM `RCA-records_epreuves` WHERE category=’$cat”.”$sexe’ ORDER BY `order`;”;

foreach( $wpdb->get_results($epreuveQuery) as $key => $epreuve) {
echo “

“.$epreuve->name.”

“;
$query =”SELECT * FROM `”.$table.”` WHERE epreuve=’$epreuve->name’ And `unite` < = 15 ORDER BY `unite`;"; $i = 1; $count = 0; echo "

“;
foreach( $wpdb->get_results($query) as $key => $athlete) {
if($count%2==0)
echo “

“;
else
echo ‘ ‘;

echo “

” //numero de place
.”


.”


.”


.”


.”

“;

$count++;
}//end foreach athlete
echo “

“;
} //end foreach epreuve

[/insert_php]
[insert_php]

global $wpdb;

$cat = ‘tc’;
$sexe = ‘f’;
$table = ‘RCA-record’.$cat.$sexe;
$epreuveQuery = “SELECT * FROM `RCA-records_epreuves` WHERE category=’$cat”.”$sexe’ ORDER BY `order`;”;

foreach( $wpdb->get_results($epreuveQuery) as $key => $epreuve) {
echo “

“.$epreuve->name.”

“;
$query =”SELECT * FROM `”.$table.”` WHERE epreuve=’$epreuve->name’ And `unite` < = 15 ORDER BY `unite`;"; $i = 1; $count = 0; echo "

“.$athlete->unite.” $athlete->nom $athlete->prenom $athlete->date $athlete->lieu $athlete->perf
“;
foreach( $wpdb->get_results($query) as $key => $athlete) {
if($count%2==0)
echo “

“;
else
echo ‘ ‘;

echo “

” //numero de place
.”


.”


.”


.”


.”

“;

$count++;
}//end foreach athlete
echo “

“;
} //end foreach epreuve

[/insert_php]
“.$athlete->unite.” $athlete->nom $athlete->prenom $athlete->date $athlete->lieu $athlete->perf