[psycopg] UPDATE command - Mailing list psycopg

From Graeme Gemmill
Subject [psycopg] UPDATE command
Date
Msg-id 20b5f7fe-b065-d108-77d3-3fc64eb0c5fa@gemmill.name
Whole thread Raw
Responses Re: [psycopg] UPDATE command
List psycopg
I wish to issue an UPDATE command to update 4 columns of a row that has
a unique primary key vindex:

SQL = "UPDATE contact SET firstname, addnlnames, surname, rev WHERE
vindex =? (%s, %s, %s, %s);"
data = (.......)
cursor.execute(SQL, data)

How is the value of vindex specified? Is my ? to be replaced by %s where
the value of vindex is the first of the data values?

Yours in confusion,

Graeme



psycopg by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: [psycopg] Site search
Next
From: Tom Kazimiers
Date:
Subject: [psycopg] Fetching data from binary cursor