如何获取python发送给sqlite的真实查询?

时间:2019-05-01 22:39:26

标签: python sqlite

我有以下代码,我想获取python发送的真实查询。

pf = "try"  
cat = "man"  
sub_cat = "young" 

cursor.execute("SELECT * FROM `cat` WHERE `pf` = ? AND `cat` = ? AND `sub_cat` = ?", (pf, cat, sub_cat))

我该怎么办? 我想得到的结果是:

SELECT * FROM `cat` WHERE `pf` = "try" AND `cat` = "man" AND `sub_cat` = "young"

亲切的问候

0 个答案:

没有答案