DBI spec and parameter passing

Thomas Wouters thomas at xs4all.net
Mon Jan 17 19:58:09 EST 2000


On Mon, Jan 17, 2000 at 07:24:21PM -0500, Gordon McMillan wrote:
> Skip wrote:
> >               """ country = %s""", (city, state, country))

> but Skip _meant_:

> c.execute(""" select id from city where city = ? and state = ? 
> and country = ?""", (city, state, country))

Doesn't that depend on the DB-API module in question ? As I recall, it's
module-dependant what kind of arguments it accepts, and you can query an
attribute to find out the specifics of that module.

Or-is-that-loud-noise-my-brain-farting-ly y'rs
-- 
Thomas Wouters <thomas at xs4all.net>

Hi! I'm a .signature virus! copy me into your .signature file to help me spread!




More information about the Python-list mailing list