As you read through the scriptures one thing that you will find is that they not only record victories of Gods people, but also their defeats. It records their steps of faith, and we are INSPIRED. And it records their steps into sin and we are WARNED. We see some of Gods servants starting out well, but not all of them finish well.
Sadly, Solomon serves as an example for us of a man that started out well, but he did not finish well.
The Lord had appeared to Solomon on two different occasions. The Lord had blessed him with unprecedented wisdom, wealth, and success. Yet over time, Solomon turned his back upon God's Word, and his heart followed. Solomon had warned others to "guard their hearts," yet he did not heed his own council. May God help us to learn how to be victorious, and to avoid making decisions that will lead to our own demise.