If a man sees the signs of sexual discharge impurity (janaba) on his clothes, and he is not sure when the discharge occurred, and he had performed several prayers (salaat) not knowing, he has to perform major ablution (ghusl) and repeat the salaat from the most recent sleep in which he was wearing this clothes. However, if he finds out that the janaba was from a previous sleep, then he should repeat salaat from the last sleep he thinks the janaba occurred1. The references (adillah) on the religious duty of performing ghusl due to janaba in preparation for salaat are many, one of which is Allah's command in the Qur'an, a translated meaning of which is: "O' You who believe, do not get approach salaat while you are drunk until you know what you are saying, nor while impure due to sexual discharge (junob) unless you are traveling about until you perform ghusl" (4:43). And Ali's narration (hadith), (may Allah be pleased with him), in which he said "I was a man with frequent urethral discharge, so I kept performing ghusl until the skin of my back started cracking, so I mentioned this to the Prophet peace be upon him (or it was mentioned to him) so the messenger of Allah (peace be upon him) said, "Don't do ghusl if you see urethral discharge, just wash your male organ and perform wudu' same as wudu' of salaat. If semen appears, then perform ghusl"2. This hadith indicates that appearance of semen requires ghusl whereas urethral discharge only needs washing of the sexual organ followed by wudu'.
From the book What Should You Do in the Following Situtations...?
1 Al-Mughni ma'a al-Sharh il-Kabeer 1/199.
2 Narrated by Abu Dawood number 206 and verified sahih by Albani in Arwaa' al-Ghaleel number 125.
Sheikh Muhammed Salih Al-Munajjid