PyDO2, deleteSome() is broken?
Steve Kieu <[email protected]> Mon, 30 May 2005 08:32:02 +1000 (EST)
| Newsgroups | gmane.comp.web.skunkweb |
|---|---|
| Message-ID | <[email protected]> |
Hi,
whenever I call deleteSome it throw errors
File "//ppcshop/test.html", line 22, in ?
temp.deleteSome(EQ(FIELD('name'),'hu'))
File
"/usr/lib/python2.4/site-packages/PyDO2/base.py", line
543, in deleteSome
return conn.execute(query, values)
File
"/usr/lib/python2.4/site-packages/PyDO2/dbi.py", line
112, in execute
c.execute(sql, values)
File
"/usr/lib/python2.4/site-packages/MySQLdb/cursors.py",
line 132, in execute
self.errorhandler(self, TypeError, m)
File
"/usr/lib/python2.4/site-packages/MySQLdb/connections.py",
line 33, in defaulterrorhandler
raise errorclass, errorvalue
TypeError: unsupported operand type(s) for %: 'list'
and 'tuple'
----------------------------------------
Tag traceback (most recent tag last):
File "//ppcshop/test.html", line 4
<:call
"`temp.deleteSome(EQ(FIELD('name'),'hu'))`":>
However if I call delete() from an instance it works
fine. so have to do like:
tmp=temp.getSome(EQ(FIELD('name'),'hu'))
for i in tmp: i.delete()
I guess the second approach is less optimal.
Regards,
S.KIEU
Find local movie times and trailers on Yahoo! Movies.
http://au.movies.yahoo.com
-------------------------------------------------------
This SF.Net email is sponsored by Yahoo.
Introducing Yahoo! Search Developer Network - Create apps using Yahoo!
Search APIs Find out how you can build Yahoo! directly into your own
Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005