Здраствуйте, не могу понять почему мой код не добавляет в таблицу более одной записи(( Подскажите как вставить несколько штук? С уважением, Андрей.
| Код | >>> cursor.execute("INSERT INTO `upvd01` ( `upvd01`.`a`, `upvd01`.`d`, `upvd01`.`g`) VALUES (%s, %s, %s)" , ([0,0,0]) ) 1L
>>> cursor.execute("INSERT INTO `upvd01` ( `upvd0 `g`) VALUES (%s, %s, %s)" , ([0,0,0],[1,1,1]) ) Traceback (most recent call last): File "<stdin>", line 1, in <module> File "C:\Python25\lib\site-packages\MySQLdb\cur query = query % db.literal(args) TypeError: not enough arguments for format string
>>> cursor.execute("INSERT INTO `upvd01` ( `upvd01`.`a`, `upvd01`.`d`, `upvd01`.`g`) VALUES (%s, %s, %s)" , (0,0,0) ) 1L
|
Добавлено @ 09:28 делал по образцу http://megalib.com/books/129/glava05.htm |