Something More Elegant
Victor Subervi
victorsubervi at gmail.com
Sat Jan 9 08:23:06 EST 2010
Hi;
The following code works fine. I would like you to suggest something more
simple and elegant:
sql = 'select p.ID from %sPackages p join %sCategoriesPackages c where
c.CategoryID=%s;' % (store, store, categoryID)
cursor.execute(sql)
tmp = [itm[0] for itm in cursor]
packageIDs = []
for t in tmp:
if t not in packageIDs:
packageIDs.append(t)
TIA,
beno
--
The Logos has come to bear
http://logos.13gems.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20100109/8458b15c/attachment.html>
More information about the Python-list
mailing list