Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- report=cursor.fetchall()
- print ('<table border="0"><tr><th>source</th><th>period</th><th>signup</th><th>donor</th><th>avg_donation</th></tr>')
- print ('<tbody>')
- for field in report:
- source = field[0]
- period = field[1]
- signup = field[2]
- donor = field[3]
- avg_donation = field[4]
- print ('<tr><td>' + source + '</td><td>' + str(period) + '</td><td>' + str(signup) + '</td><td>' + str(donor) + '</td><td>' + avg_donation + '</td></tr>')
- print ('</tbody>')
- print ('</table>')
- cursor.close()
- dbconn.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement