[PDO-Users]passing params
pythondbo-users-admin-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Sun, 1 Aug 2004 23:27:34 -0700
| Newsgroups | gmane.comp.python.db.pdo.user |
|---|---|
| Message-ID | <[email protected]> |
Hi,
I'm a newbie and just started using the PDO module. In the Doc's if my
connection.paramstlye = 'pyformat' then
I pass params as '...WHERE name=%(name)s' but does not appear to work.
mysono='11532'
myRS=db.open("select * from sosord where csono='%s'"% mysono)
the above works.... but
myRS=db.open('select * from sosord where csono=%(mysono)s')
the above does not work
This is what should be passed
myRS=db.open("select * from sosord where csono='11532'")
So could someone explain what is happening
Thanks john
-------------------------------------------------------
This SF.Net email is sponsored by OSTG. Have you noticed the changes on
Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now,
one more big change to announce. We are now OSTG- Open Source Technology
Group. Come see the changes on the new OSTG site. www.ostg.com