Advertisement
Guest User

Untitled

a guest
Dec 4th, 2016
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. report=cursor.fetchall()
  2. print ('<table border="0"><tr><th>source</th><th>period</th><th>signup</th><th>donor</th><th>avg_donation</th></tr>')
  3. print ('<tbody>')
  4. for field in report:
  5. source = field[0]
  6. period = field[1]
  7. signup = field[2]
  8. donor = field[3]
  9. avg_donation = field[4]
  10. print ('<tr><td>' + source + '</td><td>' + str(period) + '</td><td>' + str(signup) + '</td><td>' + str(donor) + '</td><td>' + avg_donation + '</td></tr>')
  11. print ('</tbody>')
  12. print ('</table>')
  13. cursor.close()
  14. dbconn.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement