Re: mysql "rows affected"

2007-04-29 Thread Carl K
Dennis Lee Bieber wrote: > On Thu, 26 Apr 2007 18:18:57 -0700, John Nagle <[EMAIL PROTECTED]> > declaimed the following in comp.lang.python: > >> Carl K wrote: >>> using MySQLdb, I do cursor.execute("update...") >>> >>> How can I tell how many rows were affected ? >>> >>> Carl K >> cursor = d

Re: mysql "rows affected"

2007-04-26 Thread Carl K
John Nagle wrote: > Carl K wrote: >> using MySQLdb, I do cursor.execute("update...") >> >> How can I tell how many rows were affected ? >> >> Carl K > > cursor = db.cursor() # get cursor > cursor.execute(sqlstatement, argtuple) # do command > rowsaffected = cursor.ro

Re: mysql "rows affected"

2007-04-26 Thread John Nagle
Carl K wrote: > using MySQLdb, I do cursor.execute("update...") > > How can I tell how many rows were affected ? > > Carl K cursor = db.cursor() # get cursor cursor.execute(sqlstatement, argtuple) # do command rowsaffected = cursor.r

Re: mysql "rows affected"

2007-04-26 Thread Ian Clark
Both cursor.execute() and cursor.executemany() return the number of rows affected. Here is a link to the documentation: http://mysql-python.sourceforge.net/MySQLdb-1.2.2/public/MySQLdb.cursors.BaseCursor-class.html#execute Ian On 4/26/07, Carl K <[EMAIL PROTECTED]> wrote: using MySQLdb, I do

mysql "rows affected"

2007-04-26 Thread Carl K
using MySQLdb, I do cursor.execute("update...") How can I tell how many rows were affected ? Carl K -- http://mail.python.org/mailman/listinfo/python-list