After running a query from a MySQL database I het the following result:
(datetime.date(2000, 11, 11), u'superuser', datetime.date(2000, 11,11),u'yes')
(datetime.date(2001, 11, 11), u'superuser', datetime.date(2001, 11,11),u'yes')
(datetime.date(2002, 11, 11), u'superuser', datetime.date(2002, 11,11),u'yes')
(datetime.date(2003, 11, 11), u'superuser', datetime.date(2003, 11,11),u'yes')
Those results comes from a databse which has four columns:
last_login | is_superuser | data_joined | is_active
My problem is that I need to insert those data in another database that has the same structure, but I need to parse the data in a way that MySQL will be able to accept the query:
INSERT INTO auth_user.auth_user (last_login, is_superuser, data_joined,
is_active) VALUES
('2008-11-11', 'superuser', '2008-11-11', 'yes'),
('2008-11-11', 'superuser', '2008-11-11', 'yes'),
('2008-11-11', 'superuser', '2008-11-11', 'yes'),
('2008-11-11', 'superuser', '2008-11-11', 'yes')[...];
I am struggling to obtain this format from the previous one, does anyone has any suggestion how to approach this problem?