[DB-SIG] PyGresSql help

Deirdre Saoirse deirdre@deirdre.net
Mon, 24 Jan 2000 20:55:42 -0800 (PST)

On Mon, 24 Jan 2000, Jim Johannsen wrote:

> cnx.query("INSERT INTO county VALUES(%s,%s,%s)")  %(Ldata[0], Ldata[1],
> Ldata[3])

I haven't used this,  but it seems to me:

cnx.query("INSERT INTO county VALUES('%s', '%s', '%s')")
 % (Ldata[0], Ldata[1], Ldata[3])

At least, that's how I've done it on other sql implementations.

_Deirdre   *   http://www.linuxcabal.net   *   http://www.deirdre.net
"Mars has been a tough target" -- Peter G. Neumann, Risks Digest Moderator
"That's because the Martians keep shooting things down." -- Harlan Rosenthal
<Harlan.Rosenthal@Dialogic.com>, retorting in Risks Digest 20.60