«كان إذا دخل المسجد قال:» ...... اللهم صل على محمد وأزواج محمد "
It was the practice of the Prophet (peace and blessings be upon him):
"When he (peace and blessings be upon him) entered the mosque, he would say: O Allah, send Your mercy upon Muhammad (peace and blessings be upon him) and upon the wives of Muhammad (peace and blessings be upon him)."