The traitors shall dry up in vain. Rabbi Pinchas said that King David, our Master of the world, said, "When I stand in prayer before You, may my prayer not be despised before You, because the eyes of Israel are dependent on me and my eyes are dependent on You. If You hear my prayer, it is as if You have heard their prayer." And similarly, we find in the public fast, when the congregation is fasting, the cantor goes down before the ark, and the eyes of the congregation are dependent on him, while his eyes are dependent on the Holy One, blessed be He, and He hears their prayer. Therefore it is said, "None of your petitioners shall be desolate."
David Prayed Not Just for Himself but All Israel
Midrash Tehillim 25:5