On Friday 09 July 2010 07:18:30 Sells, Fred wrote: > In MySQLdb you do something similar to > > Records = [ (1,2,3), (4,5,6), (7,8,9) , (11,22,33) ] > > cursor.execute('insert to mytable (a,b,c) VALUES (%s, %s, %s)', Records) > #untested. > > This would insrt 4 rows >
it is two statements ;-). I suppose one needs a for loop: given a model called Prefix - with one field: 'name' pf = ['a','b','c'] for x in pf: Prefix.objects.create(name='%s' %x) of course it is three statements. -- Regards Kenneth Gonsalves Senior Associate NRC-FOSS at AU-KBC -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.