Resultats per jornada Grup B

[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 = ‘B’ AND num_jornada = ‘$num_jornada’ ORDER by `num_jornada` ASC”);

if($queryjora)
{

while($datos_jornada = mysqli_fetch_array($queryjora))
{
$sql_nomlocal = “SELECT nom_club, id from clubs where id = ‘$datos_jornada[club_local]’ AND grup_club = ‘B'”;
$sql_nomvisitan = “SELECT nom_club, id from clubs where id = ‘$datos_jornada[club_visitan]’ AND grup_club = ‘B'”;

$query_nomlocal = mysqli_query($conex, $sql_nomlocal);
if($nom_oklocal = mysqli_fetch_array($query_nomlocal))
{
$equiplocal = $nom_oklocal[“nom_club”];
$clubidlocal = $nom_oklocal[“id”];
}
$query_nomvisitan = mysqli_query($conex, $sql_nomvisitan);
if($nom_okvisitan = mysqli_fetch_array($query_nomvisitan))
{
$equipvisitan = $nom_okvisitan[“nom_club”];
$clubidvisitan = $nom_okvisitan[“id”];
}
echo ‘

‘;
echo ‘

‘;
echo ‘

‘;
echo ‘

‘;
echo ‘

‘;
echo ‘

‘;
echo ‘

‘;
echo ‘

‘;
}
}
–$num_jornada;

}
echo ‘

Jornada Nº: ‘.$num_jornada.’
‘.utf8_encode($equiplocal).’ ‘.$datos_jornada[“punts_local”].’ ‘.$datos_jornada[“bitlles_local”].’ ‘.utf8_encode($equipvisitan).’ ‘.$datos_jornada[“punts_visitan”].’ ‘.$datos_jornada[“bitlles_visitan”].’

‘;
echo ‘

‘;
[/insert_php]


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