Replacing value in all cursor rows
问题 Using SQLite and Python 3.1, I want to display currency data in a HTML table via. a template which accepts a cursor as a parameter. Hence all currency values must have 2 decimal places, but SQLite stores them as float type (even though the structure states decimal :-( ) so some must be converted before display (eg. I want 12.1 displayed as 12.10). The code goes something like this (simplified for illustration)... import sqlite3 con = sqlite3.connect("mydb") con.row_factory = sqlite3.Row cur =