If you pray for something that is God's will, then I agree.
If you pray for something that is contrary to God's will, then I don't agree.
If God caused you to pray "X" and God wanted "X" to happen, then "X" will happen.
If God caused you not to pray "X" and God wanted "X" to happen, then "X" will happen.
If God caused/allowed you to pray "Y" and God wanted "X" to happen, then "X" will happen.
God is all wise and all knowing so the ONLY way the best possible plan can occur is if God controls every aspect of the plan.
Prayer is (1) an offering up of our desires unto God for things (2) agreeable to His will and (3) done with faith, (4) with confession of our sins, (5) with worship, thanksgiving, sincerity, (6) humbleness, (7) with obedience, (8) persistence, (9) in the name of Christ, (10) in the Spirit, (11) as a method by which God accomplished His sovereign will via second causes, with (12) reverence, (13) we should be animated to pray with the sure hope of succeeding, (14) with boldness and (15) the intersession of the Spirit.
Prayer also is the out working of God. Romans 8:26 Likewise the Spirit helps us in our weakness. For we do not know what to pray for as we ought, but the Spirit himself intercedes for us with groaning too deep for words.
To ensure you always get what you want, just end all your prayers with: "not my will but Thy will be done" and you will be 100% successful. This is preferable and less successful than: "not Your will but my will be done".
I do that to try to fool people into thinking I know what I am talking about.
Have a good day.