summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoradustman <adustman@9fc6cd9a-920d-0410-adcf-ac96716ed7e8>2002-06-15 23:38:54 +0000
committeradustman <adustman@9fc6cd9a-920d-0410-adcf-ac96716ed7e8>2002-06-15 23:38:54 +0000
commit58866a76fa60c3829b2083fa92f2198825195769 (patch)
treebe1352f24c76e052e95bec98bd6388f52e18705a
parent0b5cdd48b0e960f5da011922a5845a03808141e5 (diff)
downloadmysqldb1-58866a76fa60c3829b2083fa92f2198825195769.tar.gz
Make executemany iterate over queries that don't use multiple VALUES
-rw-r--r--MySQLdb/MySQLdb/cursors.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/MySQLdb/MySQLdb/cursors.py b/MySQLdb/MySQLdb/cursors.py
index aa52f02..44cfe07 100644
--- a/MySQLdb/MySQLdb/cursors.py
+++ b/MySQLdb/MySQLdb/cursors.py
@@ -106,7 +106,11 @@ class BaseCursor:
from string import join
m = insert_values.search(query)
- if not m: raise ProgrammingError, "can't find values"
+ if not m:
+ r = 0
+ for a in args:
+ r = r + self.execute(query, a)
+ return r
p = m.start(1)
qv = query[p:]
qargs = self.connection.literal(args)