Ultimo problema, si spera: ogni volta inserisco dei commenti in uno stato mi vengono stampati tanti stati (tutti uguali) quanti i commenti, mi spiego?
Cioè se ho due commenti in uno stato, mi vengono stampati 2 stati con un commento scritto sotto per ogni uno.
Codice PHP:
$sql = "SELECT * FROM stato LEFT JOIN commento ON stato.IDS = commento.IDS_C ORDER BY IDS DESC";
$query = mysql_query($sql) or die (mysql_error());
while ($row = mysql_fetch_assoc($query)) {
$text = $row['TESTO'];
$quote = $row['COMMENTO'];
$stato = "$text $quote";
echo $stato;
$text = NULL;
}