答案 0 :(得分:0)
在where
附近放置空格:
+ " where " + ....
答案 1 :(得分:0)
提供所需的空格,AND
运算符和引号:
String query = "select email, password from " + table_name + " where "
+ c_2 + " = '" + mail + "' and " + C_3 + " = '" + pass + "'";
另请注意,此方法易于SQL注入。使用准备好的陈述。