public int update(Student student){
		String sql = "update student set code=?,name=?,sex=?,birthday=?,origin=?,dept=? where id = ?";
		conn = DbUtil.getConnection();
		int affectRows = 0;
		try {
			pstmt = conn.prepareStatement(sql);
			pstmt.setString(1, student.getCode());
			pstmt.setString(2, student.getName());
			pstmt.setInt(3, student.getSex());
			pstmt.setString(4, student.getBirthday());
			pstmt.setString(5, student.getOrigin());
			pstmt.setString(6, student.getDept());
			pstmt.setInt(7, student.getId());
			affectRows = pstmt.executeUpdate();
		} catch (SQLException e) {
			e.printStackTrace();
		} finally{
			DbUtil.close(rs, pstmt, conn);
		}
		return affectRows;
	}