Nagging problem with MySQLdb

Kent Johnson kent3737 at yahoo.com
Mon Nov 22 03:34:14 CET 2004


Phillip wrote:
> Hi.
> However, for about 20 hrs. now I've been trying to write data into an 
> existing table. Until now no success. I hope somebody can help me with 
> this. Here's the relevant code:
> 
>  >>>>>>
> ...
>         VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, 
> %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s);"""

I think you may need a comma here to separate the two arguments to execute.

>         [data01, data02, data03, data04, data05, data06, data07, data08, 
> data09, data10, data11, data12, data13, data14, data15, data16, data17, 
> data18, data19, data20, data21, data22, data23, data24, data25, data26, 
> data27, data28, data29]
>     )
> <<<<<<
> 
> The error I get with this one is:
> "TypeError: string indices must be integers"
> 



More information about the Python-list mailing list