Resultats per jornada Grup A

[insert_php]

$conex = new mysqli(“bbdd.bitllesdelleida.cat”, “ddb21026”, “eXtint0r_l0l”, “ddb21026”);
if ($conex ->connect_errno) {
echo “Fallo al conectar a MySQL: (” . $mysqli->connect_errno . “) ” . $mysqli->connect_error;
}

echo ‘

‘;

$querynumjor = mysqli_query($conex, “SELECT * FROM `jornades` group by `num_jornada` ORDER by `num_jornada` DESC”);

$jor = mysqli_fetch_array($querynumjor);
$num_jornada = $jor[“num_jornada”];

while($num_jornada > 0)
{
echo ‘

‘;
echo ‘

‘;

$queryjora = mysqli_query($conex, “SELECT * FROM `jornades` WHERE grup = ‘A’ AND num_jornada = ‘$num_jornada’ ORDER by `num_jornada` ASC”);

if($queryjora)
{

while($datos_jornada_a = mysqli_fetch_array($queryjora))
{
$sql_nomlocal_a = “SELECT nom_club, id from clubs where id = ‘$datos_jornada_a[club_local]’ AND grup_club = ‘A'”;
$sql_nomvisitan_a = “SELECT nom_club, id from clubs where id = ‘$datos_jornada_a[club_visitan]’ AND grup_club = ‘A'”;

$query_nomlocal_a = mysqli_query($conex, $sql_nomlocal_a);
if($nom_oklocal_a = mysqli_fetch_array($query_nomlocal_a))
{
$equiplocal_a = $nom_oklocal_a[“nom_club”];
$clubidlocal_a = $nom_oklocal_a[“id”];
}
$query_nomvisitan_a = mysqli_query($conex, $sql_nomvisitan_a);
if($nom_okvisitan_a = mysqli_fetch_array($query_nomvisitan_a))
{
$equipvisitan_a = $nom_okvisitan_a[“nom_club”];
$clubidvisitan_a = $nom_okvisitan_a[“id”];
}
echo ‘

‘;
echo ‘

‘;
echo ‘

‘;
echo ‘

‘;
echo ‘

‘;
echo ‘

‘;
echo ‘

‘;
echo ‘

‘;
}
}
–$num_jornada;

}
echo ‘

Jornada Nº: ‘.$num_jornada.’
‘.utf8_encode($equiplocal_a).’ ‘.$datos_jornada_a[“punts_local”].’ ‘.$datos_jornada_a[“bitlles_local”].’ ‘.utf8_encode($equipvisitan_a).’ ‘.$datos_jornada_a[“punts_visitan”].’ ‘.$datos_jornada_a[“bitlles_visitan”].’

‘;
echo ‘

‘;
[/insert_php]


Associació de Bitlles Catalanes Terra Ferma de Lleida (BdeLL)