si scusami, allora il problema è questo:
ho 4 squadre di calcio, ad esempio Juventus, Milan, Inter, Lecce, che le prelevo da un database in mysql, costruire le partite (andata e ritorno) con esse. Quindi
Milan - Inter
Inter - Milan
Lecce - Juve
Juve - Lecce
Inter - Juve
Juve - Inter
Milan - Lecce
Lecce - Milan
Inter - Lecce
Lecce - Inter
Query squadra mysql
+------------+-------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+------------+-------------+------+-----+---------+----------------+
| id_squadra | int(5) | NO | UNI | NULL | auto_increment |
| nome_s | varchar(25) | NO | PRI | | |
| marca | varchar(25) | YES | | | |
| sponsor | varchar(25) | YES | | | |
| allenatore | varchar(25) | YES | | | |
| id_stadio | int(3) | YES | | 0 | |
+------------+-------------+------+-----+---------+----------------+
[php] Ho selezionato la query squadra
//Seleziona le squadre
$nomi_s = @mysql_query("SELECT nome_s FROM squadra");
if(!$nomi_s)
echo "Errore!";
while ($result = mysql_fetch_array($nomi_s)) {
$nome_s = $result['nome_s'];
echo "<a href='info_s.php?id_squadra=$id_squadra&nome_s=$nome_s&nazione =$nazione'><i>$nome_s<i>" . " - " . "</td>\n";
}
Ora come posso applicare lo schema andata e ritorno per le partite?
Grazie ancora a tutti.
|