如何在字符串变量周围添加引号?我的数据库执行查询如果""
围绕变量名我该怎么办?我这样做了,"+"+ School_name+"+"
但它不起作用我如何用引号添加变量名?
Bundle bundle = this.getIntent().getExtras();
School_name = bundle.getString("Serachvalue");
db.selectQuery("SELECT * FROM uss_school sch LEFT JOIN uss_school_to_level sl ON
sch.school_id = sl.school_id LEFT JOIN uss_level l ON sl.level_id = l.level_id WHERE
l.title ="+ School_name+" ORDER BY sch.name ASC");
但是数据库用引号执行wuery,
SELECT * FROM uss_school sch LEFT JOIN uss_school_to_level sl ON sch.school_id =
sl.school_id LEFT JOIN uss_level l ON sl.level_id
= l.level_id WHERE l.title = "Elementary" ORDER BY sch.name ASC