Hadith 790:5
Waki' narrated to us, Ibrahim bin Tahman narrated to us, from Husayn al-Mu'allim, from Ibn Buraydah, from Imran bin Husayn, who said: I had hemorrhoids, so I asked the Prophet, peace and blessings of Allah be upon him, about prayer. He said: "Pray standing; if you are not able, then sitting; and if you are not able, then on your side."
حدثنا وكيع، حدثنا إبراهيم بن طهمان، عن حسين المعلم، عن ابن بريدة، عن عمران بن حصين قال: كان بي الناصور فسألت النبي صلى الله عليه وسلم عن الصلاة؟ فقال: " صل قائما، فإن لم تستطع فقاعدا، فإن لم تستطع فعلى جنب "