|

楼主 |
发表于 2019-3-18 08:11:50
|
显示全部楼层
//查看输入的邮箱是否存在
public static JSONObject checkUsername(JSONObject params,ActionContext context) throws SQLException, NamingException{
JSONObject result = new JSONObject();
String email = params.getString("param");
Connection conn=null;
try{
conn = context.getConnection("demo");
String sql = "SELECT COUNT(fPhoneNumber) FROM NETEASE_USER WHERE fPhoneNumber='"+email+"'";
System.out.println(sql);
int count = Integer.parseInt(DataUtils.getValueBySQL(conn, sql, null).toString());
result.put("count", count);
return result;
} finally {
conn.close();
}
}
结贴吧,我找到原因了,在这段代码的中间修改数据表名
|
|