Hi,
I get some problem when i like to set the table name dynamic.
I'm appreciate for any help.
Christian
### works ####
newcur.execute ( """ INSERT INTO events (id1,id2) VALUES (%s,%s);
""" , (rs[1],rs[2]))
### works not
newcur.execute ( """ INSERT INTO %s_events (id1,id2) VALUES (%s,
%s); """ , (table_name,rs[1],rs[2]))
### works but is not really perfect: None from rs list result in
"None" instead of NULL.
newcur.execute ( """ INSERT INTO %s_events (id1,id2) VALUES
('%s','%s'); """ % (table_name,rs[1],rs[2]))
--
http://mail.python.org/mailman/listinfo/python-list