You need to get the data out of an sqlite database using Python right? Why are you pasting the database insertion code then? It has nothing to do with your question.
– João PereiraJul 2 '14 at 10:59

Just want to show my code and maybe there are some area I should change so that's why I seeking for help from you guys, Hal
– user3127380Jul 2 '14 at 11:53

@user3127380 This would fit better on Code Review, a site meant for code review or Stack Overflow, a programming-specific Stack Exchange. This site is specifically meant for Raspberry Pi-related issues (GPIO, PiCam, issues that occur only on the Pi - not on a PC, etc...)
– RPiAwesomenessJul 4 '14 at 14:51