loginmanager.java

来自「A brew application taking backup of the 」· Java 代码 · 共 37 行

JAVA
37
字号
/* * To change this template, choose Tools | Templates * and open the template in the editor. */package Login;import DBConnection.DBConnection;import java.sql.ResultSet;import java.sql.SQLException;/** * * @author Work IS Passion */public class LoginManager {       DBConnection dbc;    public LoginManager() {        dbc = new DBConnection();    }    public String Validate ( String user) throws SQLException {         ResultSet rs = null;            String Query = "select user_id from user where user_id = '"+user+"'";            String msg = null;            rs = dbc.select(Query);            if (rs.next()){                msg = "SUCCESS";            }            else {                msg = "FAILURE";            }            return msg;    }}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?