public int updateReservation(String[] info){
		//1.ó¥ 
		//2.ϼ 20 Ѵ Ȯ,  Ȯ
		//3. ̸ ϵ  Ȯ, ġ   ٽÿ
		//4.()
		String staff_query = "select name from staff";
		Object[][] staff = helper.executeSelectQuery(staff_query);
		int random_number = (int)(Math.random()*staff.length);
		info[2] = staff[random_number][0].toString();
		
		String query ="";
		int error_code = 0;
		
//		if(new Integer(info[3]).intValue() >= date){
			if(new Integer(info[4]).intValue() >= 20){// 20 ѱ涧
				int upgrade_room_number = upgradeRoom(new Integer(info[0]).intValue(), info[3],new Integer(info[4]).intValue());
//				System.out.println(upgrade_room_number);
//				System.out.println("1");
				if(new Integer(info[0]).intValue() == upgrade_room_number){//upgrade   
//					System.out.println("2");
					if(!checkRoom(new Integer(info[0]).intValue(), info[3],new Integer(info[4]).intValue())){//
//						System.out.println("4");
						confirmReservation(info[1], info[3],new Integer(info[4]).intValue());
						query = "insert into reservation values("+info[0]+",'"+info[1]+"','"+info[2]+"',to_date('"+info[3]+"','YYYY/MM/DD'),"+info[4]+")";
						if(!helper.update(query)){
							error_code = -1;//   
						}
					}else{
						if(!confirmReservation(info[1], info[3],new Integer(info[4]).intValue())){
							error_code = 2; //̹ 
						}else{
							query = "insert into reservation values("+info[0]+",'"+info[1]+"','"+info[2]+"',to_date('"+info[3]+"','YYYY/MM/DD'),"+info[4]+")";
							if(!helper.update(query)){
								error_code = -1;//   
							}
						}
					}
				}else{//upgrade   ο ϶,ִ¹
//					System.out.println("3");
					confirmReservation(info[1], info[3], new Integer(info[4]).intValue());
					query = "insert into reservation values("+upgrade_room_number+",'"+info[1]+"','"+info[2]+"',to_date('"+info[3]+"','YYYY/MM/DD'),"+info[4]+")";
					if(!helper.update(query)){
						error_code = -1;//   
					}
				}
			}else{
				if(!checkRoom(new Integer(info[0]).intValue(),info[3],new Integer(info[4]).intValue())){
					confirmReservation(info[1],info[3],new Integer(info[4]).intValue());
					query = "insert into reservation values("+info[0]+",'"+info[1]+"','"+info[2]+"',to_date('"+info[3]+"','YYYY/MM/DD'),"+info[4]+")";
					if(!helper.update(query)){
						error_code = -1;//   
					}
				}else{
					if(!confirmReservation(info[1],info[3],new Integer(info[4]).intValue())){
						error_code = 2;//̹ 
					}else{
						query = "insert into reservation values("+info[0]+",'"+info[1]+"','"+info[2]+"',to_date('"+info[3]+"','YYYY/MM/DD'),"+info[4]+")";
						if(!helper.update(query)){
							error_code = -1;//   
						}
					}
				}
			}
//		}else{
//			error_code = 1;//¥
//		}
//		System.out.println(query);
		return error_code;
	}