public void sellCoupon(String id,String cou_name){
		Connection conn = null;
		PreparedStatement pstmt = null;
		ResultSet rs = null;
		String sql = "";
		int count = 0;
		try{
			conn = getConnection();
			sql = "select max(cou_num) from coupon where cou_name=? and cou_usage=0";
			pstmt=conn.prepareStatement(sql);
			pstmt.setString(1, cou_name);
			rs =pstmt.executeQuery();
			if(rs.next()){
				count = rs.getInt(1);
			}
			sql = "update coupon set cou_usage=1, id=? where cou_num=?";
			pstmt = conn.prepareStatement(sql);
			pstmt.setString(1, id);
			pstmt.setString(2, cou_name);
			pstmt.executeUpdate();
		}catch(Exception ex){
			ex.printStackTrace();
		}finally{
			if(rs!=null)try{rs.close();}catch(SQLException ex){}
			if(pstmt!=null)try{pstmt.close();}catch(SQLException ex){}
			if(conn!=null)try{conn.close();}catch(SQLException ex){}
		}
	}