1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
|
SELECT 'News' AS type, 'news.php?article=' AS adresse, commentaires_newsv2.id, commentaires_newsv2.id_news, commentaires_newsv2.auteur, commentaires_newsv2.commentaire, commentaires_newsv2.date_commentaire, newsv2.article AS article, newsv2.titre_news AS papouille
FROM commentaires_newsv2
INNER JOIN newsv2
ON ( newsv2.id = commentaires_newsv2.id_news )
ORDER BY id DESC LIMIT 13)
UNION
(
SELECT 'Test' AS type, 'tests.php?article=' AS adresse, commentaires_testsv2.id, commentaires_testsv2.id_test, commentaires_testsv2.auteur, commentaires_testsv2.commentaire, commentaires_testsv2.date_commentaire, testsv2.article AS article, 'Titre' AS papouille
FROM commentaires_testsv2
INNER JOIN testsv2
ON ( testsv2.id = commentaires_testsv2.id_test )
ORDER BY id DESC LIMIT 13)
UNION
(
SELECT 'Amavideo' AS type, 'amavideos.php?article=' AS adresse, commentaires_amavideosv2.id, commentaires_amavideosv2.id_amavideo, commentaires_amavideosv2.auteur, commentaires_amavideosv2.commentaire, commentaires_amavideosv2.date_commentaire, amavideosv2.article AS article, 'Titre' AS papouille
FROM commentaires_amavideosv2
INNER JOIN amavideosv2
ON ( amavideosv2.id = commentaires_amavideosv2.id_amavideo )
ORDER BY id DESC LIMIT 13)
UNION
(
SELECT 'Amawalk' AS type, 'amawalks_news.php?article=' AS adresse, commentaires_amawalks_newsv2.id, commentaires_amawalks_newsv2.id_amawalk_news, commentaires_amawalks_newsv2.auteur, commentaires_amawalks_newsv2.commentaire, commentaires_amawalks_newsv2.date_commentaire, amawalks_newsv2.article AS article, 'Titre' AS papouille
FROM commentaires_amawalks_newsv2
INNER JOIN amawalks_newsv2
ON ( amawalks_newsv2.id = commentaires_amawalks_newsv2.id_amawalk_news )
ORDER BY id DESC LIMIT 13)
ORDER BY date_commentaire DESC LIMIT 13 |