> >I get a invalid syntax error when I try to run this script - and it's
> > con.commit() which is highlighted when I get the error.
>
> Aren't you one closing parenthesis short?
>
> Alan Gauld
Yes, you're absolutely right.
Thanks.
Tommy
___
Tutor ma
On 14-Jan-11 09:03, Jason Staudenmayer wrote:
Don't build you sql separate from the execute (or so I was told when I
was doing something similar)
cur.execute(INSERT INTO tkindbtal (kommune, komnr, i2005, i2006, i2007 \
, i2008, i2009, i2010) VALUES (%s, %s, %s, %s, %s, %s,\
%s, %s)% (cols[0], col
"Tommy Kaas" wrote
I get a invalid syntax error when I try to run this script - and it's
con.commit() which is highlighted when I get the error.
Aren't you one closing parenthesis short?
cur.execute(sqlinsert,
(cols[0],
python.org] On Behalf Of
Tommy Kaas
Sent: Friday, January 14, 2011 11:43 AM
To: tutor@python.org
Subject: [Tutor] no luck with sqlinsert
I get a invalid syntax error when I try to run this script - and it's
con.commit() which is highlighted w
I get a invalid syntax error when I try to run this script - and it's
con.commit() which is highlighted when I get the error.
I can't see what is wrong. I think it looks like other scripts I'm running
without problems. The scraping part works fine. And the table exists in the
mysql db. I have just