Michael Castleton schrieb:
> but when I try the following I get 'TypeError: unindexable object':
>
> events = [1001,1002,1003]
> for num in events:
> cur2.execute("SELECT date,lat1,lon1 FROM table WHERE eventid =
%s",(num,))
>
> I have tried all manor of variation I can think of - (%s,)(n
> In particular, you're not telling us which version of python you're
> using, which database (and version) you're using, and which interface
> module you're using.
The interface and hence the db was mentioned in the subject, but it's a
good practice (though not mentioned in smart-questions.html)
On Thu, 7 Feb 2008 12:51:56 -0800 (PST) Michael Castleton <[EMAIL PROTECTED]>
wrote:
>
> Hello,
> I think I am missing something very simple. The following command works fine
> if there is no variable substitution:
> cur2.execute("SELECT date,lat1,lon1 FROM table WHERE eventid = 1001;")
>
> but
Michael Castleton schrieb:
> but when I try the following I get 'TypeError: unindexable object':
>
> events = [1001,1002,1003]
> for num in events:
> cur2.execute("SELECT date,lat1,lon1 FROM table WHERE eventid =
%s",(num,))
>
> I have tried all manor of variation I can think of - (%s,)(num
Hello,
I think I am missing something very simple. The following command works fine
if there is no variable substitution:
cur2.execute("SELECT date,lat1,lon1 FROM table WHERE eventid = 1001;")
but when I try the following I get 'TypeError: unindexable object':
events = [1001,1002,1003]
for num i