SQLAlchemy中execute防注入写法
sql = "SELECT batch,start_time,end_time " \
"from repair_order_table " \
"WHERE batch = (" \
"SELECT batch FROM repair_order_table WHERE line=:line ORDER BY start_time DESC LIMIT 1") and line=:line;"
batch_res = db.session.execute(sql,
原创
2020-08-25 17:50:43 ·
3449 阅读 ·
0 评论