not all arguments converted during string formatting

前端之家收集整理的这篇文章主要介绍了not all arguments converted during string formatting前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
>>> cur.execute(@H_301_4@"INSERT INTO foo VALUES (%s)",@H_301_4@"bar")    # WRONG
>>> cur.execute(@H_301_4@"INSERT INTO foo VALUES (%s)",(@H_301_4@"bar"))  # WRONG
>>> cur.execute(@H_301_4@"INSERT INTO foo VALUES (%s)",(@H_301_4@"bar",)) # correct
>>> cur.execute(@H_301_4@"INSERT INTO foo VALUES (%s)",[@H_301_4@"bar"])  # correct

猜你在找的Postgre SQL相关文章