我正在尝试对MySQL数据库执行一些JDBC代码,但它向我显示一个错误:
java.lang.UnsupportedOperationException: Not supported Yet.
我的代码:
public Custmor getUserByEmailAndPassword(String email,String password)
{
Custmor cst=null;
try
{
String query="select *from custmor where email=? and password=?";
PreparedStatement pstmt=con.prepareStatement(query);
pstmt.setString(1, email);
pstmt.setString(2, password);
ResultSet set=pstmt.executeQuery();
if(set.next())
{
cst=new Custmor();
cst.setId(set.getInt("id"));
cst.setName(set.getString("name"));
cst.setEmail(set.getString("email"));
cst.setPassword(set.getString("password"));
cst.setMob_no(set.getString("mob_no"));
cst.setGender(set.getString("gender"));
}
}catch(Exception e)
{
System.out.println("Error while Loging:"+e);
}
return cst;
}
如何解决此错误?
看起来像语法错误。查看您的查询