`
public int present(){
// make query for Oracle data base
String yourQry = "select * from yourtable where password = '"+pass+"' and username='"+username+"'" .
//Use this query when you are fetching data from user.
Resultset rs; // fetch your data in resultset
if(rs.next()){
// if data got fetched
return 1;
// 1 means true
}
else{
return 0; // 0 means false (No datafound)
}
} `
1 回答
佩拉斯看看How to validate my password with the value in the oracle database and also what is the difference between return 0 and return 1 in java