Am I interacting with the database correctly?

2009-01-18 Thread Hussein B
Hey, I'm new with database interactions in Python and I'm not sure if I'm handling the cursor and transactions correctly: cursor = db.cursor(MySQLdb.cursors.DictCursor) cursor.execute(flate_rate_pkgs_sql) rows = cursor.fetchall() #I have for loop here to iterate over rows

Re: Am I interacting with the database correctly?

2009-01-18 Thread John Fabiani
Hussein B wrote: Hey, I'm new with database interactions in Python and I'm not sure if I'm handling the cursor and transactions correctly: cursor = db.cursor(MySQLdb.cursors.DictCursor) cursor.execute(flate_rate_pkgs_sql) rows = cursor.fetchall() #I have for loop here to iterate

Re: Am I interacting with the database correctly?

2009-01-18 Thread Gabriel Genellina
En Sun, 18 Jan 2009 13:54:06 -0200, John Fabiani jfabi...@yolo.com escribió: I have never worked with MySQL. I do work with others. The first part looks fine. If you insert, update or delete then you need a 'commit' or a 'rollback'. Preparing data for a report it is unlikely that you need

Re: Am I interacting with the database correctly?

2009-01-18 Thread Gabriel Genellina
En Sun, 18 Jan 2009 13:54:06 -0200, John Fabiani jfabi...@yolo.com escribió: I have never worked with MySQL. I do work with others. The first part looks fine. If you insert, update or delete then you need a 'commit' or a 'rollback'. Preparing data for a report it is unlikely that you need