حَدَّثَنَا أَبُو كُرَيْبٍ، حَدَّثَنَا عَبْدُ اللَّهِ بْنُ نُمَيْرٍ، عَنْ مُوسَى بْنِ عُبَيْدَةَ، عَنْ مُحَمَّدِ بْنِ ثَابِتٍ، عَنْ أَبِي هُرَيْرَةَ، رضى الله عنه قَالَ قَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم ‏"‏ اللَّهُمَّ انْفَعْنِي بِمَا عَلَّمْتَنِي وَعَلِّمْنِي مَا يَنْفَعُنِي وَزِدْنِي عِلْمًا الْحَمْدُ لِلَّهِ عَلَى كُلِّ حَالٍ وَأَعُوذُ بِاللَّهِ مِنْ حَالِ أَهْلِ النَّارِ ‏"‏ ‏.‏ قَالَ هَذَا حَدِيثٌ حَسَنٌ غَرِيبٌ مِنْ هَذَا الْوَجْهِ ‏.‏

Abu Hurairah, may Allah be pleased with him, narrated that the Messenger of Allah (PBUH) said: “O Allah, benefit me with that which You have taught me, and teach me that which will benefit me, and increase me in knowledge. All praise is due to Allah in every condition, and I seek refuge in Allah from the condition of the people of the Fire (Allāhummanfa`nī bimā `allamtanī wa `allimnī mā yanfa`unī, wa zidnī `ilma, al-ḥamdulillāhi `alā kulli ḥālin, wa a`ūdhu billāhi min ḥāli ahlin-nār).” Translation Not Available

Book Ref: Jamiya Tirmidhi Book 48 Hadith 3599
Web Ref:  Jamiya Tirmidhi Vol 6 Book 46 Hadith 3599