我是一名程序员学习者。
我想以以下格式获取 MySQL 查询
select status from training where status in ("Open", "Delivered")
从我的代码
if(params.openCheckBox){
query +=" ( t.status IN ("+params.openCheckBox+", "+params.DeliveredCheckBox+")"
query +=" )"
}
但它给了
select status from training where status in (Open, Delivered)
这里“”(缺少双引号)