求助,想根据输入的内容,添加到SQL的查询条件中,该怎么操作
吴礼华 2019-01-10 10:32:14 String str1 =TextField1.getText().toString();
//String sql = "select * from sf where sfbh = '"+(String)str1+"'";
String sql = "select * from sf where sfbh = '"+3664362+"'";
ResultSet rs = statement.executeQuery(sql);
感觉问题出在第二行,虽然没有报错,但运行后,一直提示未找到。
后来我把要查询的内容添加在第三行,就能实现查询功能。
请大神指点一下,万分感谢。