Historical commentary by Matthew Henry. The wording and interpretations below belong to the original source.
Here David explains his meditating in God's statutes ( v. 23 ), which was of such use to him when princes sat and spoke against him. 1. Did the affliction make him sad? The word of God comforted him, and was his delight, more his delight than any of the pleasures either of court or camp, of city or country. Sometimes it proves that the comforts of the word of God are most pleasant to a gracious soul when other comforts are embittered. 2. Did it perplex him? Was he at a loss what to do when the princes spoke against him? God's statutes were his counsellors, and they counselled him to bear it patiently and commit his cause to God. God's testimonies will be the best counsellors both to princes and private persons. They are the men of my counsel; so the word is. There will be found more safety and satisfaction in consulting them than in the multitude of other counsellors. Observe here, Those that would have God's testimonies to be their delight must take them for their counsellors and be advised by them; and let those that take them for their counsellors in close walking take them for their delight in comfortable walking.
Source details
Source introductions and embedded Scripture quotations are preserved here as part of the historical edition.
Source Scripture quotation
24 Thy testimonies also are my delight and my counsellors.