dabo Commit
Revision 6857
Date: 2011-09-26 09:37:55 -0700 (Mon, 26 Sep 2011)
Author: Ed
Trac: http://trac.dabodev.com/changeset/6857
Changed:
U trunk/dabo/db/dCursorMixin.py
Log:
Added a few missing param placeholder replacements
Diff:
Modified: trunk/dabo/db/dCursorMixin.py
===================================================================
--- trunk/dabo/db/dCursorMixin.py 2011-09-26 14:31:02 UTC (rev 6856)
+++ trunk/dabo/db/dCursorMixin.py 2011-09-26 16:37:55 UTC (rev 6857)
@@ -1138,7 +1138,8 @@
aux = self.AuxCursor
if tbl is None:
tbl = self.Table
- sql = "select %s from %s where %s = ?" % (self.KeyField, tbl,
field)
+ sql = self._qMarkToParamPlaceholder("select %s from %s where %s
= ?"
+ % (self.KeyField, tbl, field))
try:
dabo.dbActivityLog.info("lookupPKWithAdd() SQL: %s,
PARAMS: %s" % (
sql.decode(self.Encoding).replace("\n",
" "), "(%s, )" % val))
@@ -1153,7 +1154,8 @@
return aux.getPK()
else:
# Add the record
- sql = "insert into %s (%s) values (?)" % (tbl, field)
+ sql = self._qMarkToParamPlaceholder("insert into %s
(%s) values (?)"
+ % (tbl, field))
aux.execute(sql, (val,))
return aux.getLastInsertID()
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message:
http://leafe.com/archives/byMID/[email protected]