prova a fare cosi:
Tabella-news: id_news, testo_news, data_news
Tabella-commenti: id_commento, id_news, testo_commento, data_commento
Codice PHP:SELECT * FROM Tabella-news AS n
INNER JOIN Tabella-commenti AS c ON c.id_news = n.id_news
WHERE 1 ORDER BY c.data_commento DESC

Rispondi quotando