tabella "sede_artista_evento"
campi:
sede_id - artista_id - evento_id
1 - 1 - 1
1 - 1 - 2
1 - 1 - 3
2 - 2 - 2
ecc...
tabella "artisti"
campi:
artista_id - nome - cognome - nome_cognome
1 paolo - bianchi - paolo_bianchi
2 mario- rossi - mario_rossi
quando faccio la query
$query = "SELECT * FROM sede_artista_evento as o LEFT JOIN artisti as c ON o.artista_id = c.artista_id WHERE sede_id='".$_GET['id']."'";
$result = mysql_query($query);
while($row = mysql_fetch_assoc($result)) {
$artisti[] = $row;
}
mi stampa
paolo bianchi
paolo bianchi
paolo bianchi
mario rossi
quello che vorrei io è
paolo bianchi
mario rossi
è possibile fare un controllo attraverso per esempio il campo nome_cognome della tabella artisti per ottenere questo?