public Coupon getBasicCoupon(String coupon) throws SQLException {
		ResultSet rs = sql.query("SELECT * FROM couponcodes WHERE name='"+coupon+"'");
		if (rs == null) return null;
		if (sql.getDatabaseOptions() instanceof MySQLOptions) rs.first();
		int usetimes = rs.getInt("usetimes");
		int time = rs.getInt("timeuse");
		String type = rs.getString("ctype");
		
		if (type.equalsIgnoreCase("Item"))
			return createNewItemCoupon(coupon, usetimes, time, null, null);
		else if (type.equalsIgnoreCase("Economy"))
			return createNewEconomyCoupon(coupon, usetimes, time, null, 0);
		else if (type.equalsIgnoreCase("Rank"))
			return createNewRankCoupon(coupon, null, usetimes, time, null);
		else if (type.equalsIgnoreCase("Xp"))
			return this.createNewXpCoupon(coupon, 0, usetimes, time, null);
		else
			return null;
	}