我正在尝试执行以下操作:
query = "SELECT * FROM table ORDER BY %s %s"
parameters = ['avg', 'DESC']
但是参数映射不正确。
SELECT * FROM table ORDER BY 'avg' 'DESC'
代替
SELECT * FROM table ORDER BY avg DESC
你知道为什么吗 ?
我正在尝试执行以下操作:
query = "SELECT * FROM table ORDER BY %s %s"
parameters = ['avg', 'DESC']
但是参数映射不正确。
SELECT * FROM table ORDER BY 'avg' 'DESC'
代替
SELECT * FROM table ORDER BY avg DESC
你知道为什么吗 ?