All of the interesting technological, artistic or just plain fun subjects I'd investigate if I had an infinite number of lifetimes. In other words, a dumping ground...

Wednesday, 16 September 2009

Bobby Tables


Python
Using the Python DB API, don't do this:
cmd = 'update people set name='%s' where id='%s'%(name, id)
curs.execute(cmd)

instead, do this:
curs.execute('update people set name=:1 where id=:2', [name, id])

http://bobby-tables.com/

No comments:

tim's shared items

Add to Google Reader or Homepage