This week's book giveaway is in the General Computing forum. We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line! See this thread for details.
1. Please indent your code properly, its almost unreadable.
2. The while loop that starts on line 49 ends at line 62, so if there are 3 rows in the database, you'll get 6 outputs (because the iterator will run with each row in the database)
3. You are only displaying the value of variable in the while loop which you never set so you'll get 0 as output. If you want the values of billMonthYear and principal, then you can change the code in the second while loop to