Bonjour,
J'ai fais une requete assez "complexe" et la plus j'avance plus je bloque!
Mon erreur est a cause des deux AND (SELECT dateline...) !
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7 SELECT user.*, SUM(thread.upload) AS tot, SUM(thread_mois.upload) AS mois, SUM(thread_lastm.upload) AS lastm FROM user LEFT JOIN thread AS thread ON (user.userid=thread.postuserid AND thread.postuserid=user.userid) LEFT JOIN thread AS thread_mois ON (user.userid=thread_mois.postuserid AND thread_mois.postuserid=user.userid AND (SELECT dateline FROM thread WHERE dateline>= " . $debut_mois . ")) LEFT JOIN thread AS thread_lastm ON (user.userid=thread_lastm.postuserid AND thread_lastm.postuserid=user.userid AND (SELECT dateline FROM thread WHERE dateline>= " . $debut_lastm . " AND dateline<= " . $fin_lastm . ")) GROUP BY user.userid ORDER BY tot DESC
Voici l'erreur que me retourne MySQL:
Si quelqu'un saurait me débloquer...Subquery returns more than 1 row
Merci beaucoup,
Cordialement,
Mathieu.
Partager