Update temp.py

Update of db connection and into table insertion