- 16
- 0
- 约8.53千字
- 约 10页
- 2016-12-03 发布于河南
- 举报
DAOimpl(删除,查询)代码
public class profeUserDAOImpl implements profeUserDAO {
/*
* 功能:此方法用户根据给定的专业编号,查询相应的专业对象 输入参数:专业编号 返回值:专业对象
*/
public profeUser find profeUserByprofe_id(int profe_id) {
// TODO Auto-generated method stub
profeUser pu = new profeUser ();
// 建立于数据库的链接
Connection conn = DatabaseConnection.getConnection();
// 封装SQL语句
String sql = select profe_id, profe_name,password from profeuser where profe_id =
+ profe_id;
Statement stmt = null;
ResultSet rs = null;
try {
stmt = conn.createStatement();
rs = stmt.executeQuery(sql);
while (rs.next()) {
au.se profe_id (
原创力文档

文档评论(0)