I'm not sure why your first example worked: "Table" is a reserved word
in SQL (i.e. it's used as a SQL command), so you shouldn't use it as a
table name. Imagine a poor dumb computer trying to parse "create table
table"...
Cheers, Michael
___
Tutor maill
0 rows affected (0.14 sec)
>
> This should fix your problem.
>
> Best Regards to you
>
> Alberto
>
>> From: nephish <[EMAIL PROTECTED]>
>> To: Alberto Troiano <[EMAIL PROTECTED]>
>> CC: tutor@python.org
>> Subject: Re: [Tutor] This should be
ok here is the error i am getting.
You have an error in your SQL syntax. Check the manual that corrosponds
to your MySQL version for the right syntax near Name ) values ('one',
'two')
thanks
___
Tutor maillist - Tutor@python.org
http://mail.python
PROTECTED]>
>To: Alberto Troiano <[EMAIL PROTECTED]>
>CC: tutor@python.org
>Subject: Re: [Tutor] This should be easy
>Date: Mon, 18 Jul 2005 20:32:55 +
>
>ok here is what i have,
>cursor.execute("INSERT INTO History (autoinc, Site Name) VALUES
>(12, '
the code looks ok for me,
Can you post more specific, including the error ?
pujo
On 7/18/05, nephish <[EMAIL PROTECTED]> wrote:
> Hey there,
>
> i have a script that i am trying to use to add a record to a MySQL
> database.
>
> i keep getting a syntax error.
>
> this works
> cursor.execute("I
Right now I don't know where to look at
>
> Best Regards
>
> Alberto
>
>> From: nephish <[EMAIL PROTECTED]>
>> To: tutor@python.org
>> Subject: [Tutor] This should be easy
>> Date: Mon, 18 Jul 2005 20:02:38 +
>>
>> ok here is the
n.org
>Subject: [Tutor] This should be easy
>Date: Mon, 18 Jul 2005 20:02:38 +
>
>ok here is the error i am getting.
>You have an error in your SQL syntax. Check the manual that corrosponds
>to your MySQL version for the right syntax near
Hey there,
i have a script that i am trying to use to add a record to a MySQL
database.
i keep getting a syntax error.
this works
cursor.execute("INSERT INTO Table ( numberone ) VALUES ( 'one');")
but this does not
cursor.execute("INSERT INTO Table ( numberone, numbertwo ) VALUES
( 'one','two')