I m试图在数据库中添加字典价值。 但是,一米的错误: 。 I m 采用这一代码。
`cols = filter_dict.keys()
vals = filter_dict.values()
("INSERT INTO table (%s) VALUES (%s)", [cols, vals])
`
When I only print this query ("INSERT INTO table (%s) VALUES (%s)", [cols, vals])
.
I m getting following output.
( INSERT INTO table (%s) VALUES (%s) , [[ cinematography , name , producer , caption , studio , editing ], [ Venkat Prasad , 100% Love , Bunny Vasu , , 100% Love Poster.jpg , Chandra Sekhar T Ramesh,Hari Prasad ]])
But When I execute this query I"m getting strange output.
the manual that corresponds to your MySQL server version for the right syntax to use near table ((" cinematography ", " name
Why execute query adding ` to each columns?? Can any one help me? thanks