In D&C 29:6 being united in prayer was because of the 6 present. What does he mean,”according to my command?”
Doctrine and Covenants 29:6 reads: “And, as it is written—Whatsoever ye shall ask in faith, being united in prayer according to my command, ye shall receive.”
From the heading for this section, this revelation was given “in the presence of six elders”, so we can assume that the immediate context is that these men all be united. The extended meaning, of course, is for all of us to be united.
I don’t think there’s any great mystery to the phrase “according to my command”. All throughout the scriptures, the Lord has commanded us to be one, or be united. For example, in Alma 6:6 we read: “Nevertheless the children of God were commanded that they should gather themselves together oft, and join in fasting and mighty prayer in behalf of the welfare of the souls of those who knew not God.”
Also, it’s possible some of these six Elders were the ones to whom revelation in D&C 23 was given:
“7 And, behold, it is your duty to unite with the true church, and give your language to exhortation continually, that you may receive the reward of the laborer. Amen.”
Here, they are commanded to unite in serving the Lord. Elsewhere, the Lord says “if ye are not one ye are not mine” (D&C 38:27). Other verses teach the ultimate reward of unity: “I am Jesus Christ, the Son of God, who was crucified for the sins of the world, even as many as will believe on my name, that they may become the sons of God, even one in me as I am one in the Father, as the Father is one in me, that we may be one.” (D&C 35:2)
In other instances (D&C 84 and 3 Nephi 27 for example), we see occasion where the Lord comes in response to unified prayer. Doubtless there were times when commands to be united in prayer were received, but not recorded (where we have access to them, at least).
Whether “according to my command” refers to a generic command that we be united, or united in prayer; or to something specific, which you and I don’t know about, commanding this group to be united in prayer, perhaps about a specific topic, the lesson for us is the same: being one with the Lord, praying for and following his guidance, as he has commanded all through scripture, will allow us to help bring about his will, and lead to the ultimate reward of exaltation.