There is a right way to pray. There is a wrong way to pray. There is both a effective way to pray and an ineffective way. There are prayers that God hears and prayers He chooses not to hear. Solomon prayed a prayer that kicked off a theophany. Everyone got to see God's glory displayed.