Re: How to specify a field name dynamically

2012-11-06 Thread jack
rmation about my question. table1 |———| | id | f1 | |———| table2 |———| | id | f2 | |———| table3 |———| | id | f3 | |———| I want define a function to insert records to someone,but I don't know how to specify a field name dynamically. I had a try like this / def insert_record(tab

Re: How to specify a field name dynamically

2012-11-06 Thread Dave Angel
f2 | > |———| > > table3 > |———| > | id | f3 | > |———| > > > I want define a function to insert records to someone,but I don't know > how to specify a field name dynamically. > I had a try like this > > / def insert_record(table, field, goods):// >

How to specify a field name dynamically

2012-11-06 Thread jack
,but I don't know how to specify a field name dynamically. I had a try like this /def insert_record(table, field, goods):// //return db.insert(table, field=goods//)/ or /def insert_record(table, **kv):// //return db.insert(table, **kv)/ but it does not works --