Package l2p.database

Examples of l2p.database.FiltredPreparedStatement.executeQuery()


        query.append("accumulated_bonus" + String.valueOf(i) + ", ");
      }
      query.append("accumulated_bonus" + String.valueOf(FESTIVAL_COUNT - 1) + " ");
      query.append("FROM seven_signs_status");
      statement = con.prepareStatement(query.toString());
      rset = statement.executeQuery();
      while(rset.next())
      {
        for(int i = 0; i < FESTIVAL_COUNT; i++)
        {
          _accumulatedBonuses[i] = rset.getInt("accumulated_bonus" + String.valueOf(i));
View Full Code Here


      try
      {
        con = L2DatabaseFactory.getInstance().getConnection();
        statement = con.prepareStatement("SELECT char_name, clanid FROM characters WHERE obj_Id = ?");
        statement.setString(1, playerId);
        ResultSet rset = statement.executeQuery();
        if(rset.next())
        {
          int clanId = rset.getInt("clanid");
          if(clanId > 0)
          {
View Full Code Here

    try
    {
      con = L2DatabaseFactory.getInstance().getConnection();
      statement = con.prepareStatement("SELECT char_obj_id, id, icon, name, descr, acronym, commands FROM character_macroses WHERE char_obj_id=?");
      statement.setInt(1, player.getObjectId());
      rset = statement.executeQuery();
      while(rset.next())
      {
        try
        {
          int id = rset.getInt("id");
View Full Code Here

    try
    {
      con = L2DatabaseFactory.getInstance().getConnection();
      statement = con.prepareStatement("SELECT * FROM auction WHERE id = ?");
      statement.setInt(1, _auction.getId());
      rs = statement.executeQuery();
      while(rs.next())
      {
        _auction.setCurrentBid(rs.getLong("currentBid"));
        _auction.setEndDate(Calendar.getInstance());
        _auction.getEndDate().setTimeInMillis(rs.getLong("endDate"));
View Full Code Here

    try
    {
      con = L2DatabaseFactory.getInstance().getConnection();
      statement = con.prepareStatement("SELECT bidderId, bidderName, maxBid, clan_name, time_bid FROM auction_bid WHERE auctionId = ? ORDER BY maxBid DESC");
      statement.setInt(1, _auction.getId());
      rs = statement.executeQuery();
      while(rs.next())
      {
        if(rs.isFirst())
        {
          _auction.setHighestBidderId(rs.getInt("bidderId"));
View Full Code Here

    ResultSet rset = null;
    try
    {
      con = L2DatabaseFactory.getInstance().getConnection();
      statement = con.prepareStatement("SELECT char_obj_id, cabal, seal, dawn_red_stones, dawn_green_stones, dawn_blue_stones, dawn_ancient_adena_amount, dawn_contribution_score, dusk_red_stones, dusk_green_stones, dusk_blue_stones, dusk_ancient_adena_amount, dusk_contribution_score FROM seven_signs");
      rset = statement.executeQuery();
      while(rset.next())
      {
        int charObjId = rset.getInt("char_obj_id");
        StatsSet sevenDat = new StatsSet();
        sevenDat.set("char_obj_id", charObjId);
View Full Code Here

        sevenDat.set("dusk_contribution_score", rset.getInt("dusk_contribution_score"));
        _signsPlayerData.put(charObjId, sevenDat);
      }
      DatabaseUtils.closeDatabaseSR(statement, rset);
      statement = con.prepareStatement("SELECT * FROM seven_signs_status");
      rset = statement.executeQuery();
      while(rset.next())
      {
        _currentCycle = rset.getInt("current_cycle");
        _activePeriod = rset.getInt("active_period");
        _previousWinner = rset.getInt("previous_winner");
View Full Code Here

      rset = statement.executeQuery();
      while(rset.next())
      {
        numLoaded++;
        statement2.setInt(1, rset.getInt("groupId"));
        rset2 = statement2.executeQuery();
        GArray<String> list = new GArray<String>();
        while(rset2.next())
        {
          list.add(rset2.getString("chatText"));
        }
View Full Code Here

    try
    {
      con = L2DatabaseFactory.getInstance().getConnection();
      statement = con.prepareStatement("SELECT id FROM siege_door WHERE unitId = ?");
      statement.setInt(1, getId());
      rset = statement.executeQuery();
      while(rset.next())
      {
        id = rset.getInt("id");
        L2DoorInstance door = DoorTable.getInstance().getDoor(rset.getInt("id"));
        door.setSiegeUnit(this);
View Full Code Here

    try
    {
      con = L2DatabaseFactory.getInstance().getConnection();
      statement = con.prepareStatement("SELECT * FROM siege_doorupgrade WHERE doorId IN (SELECT id FROM siege_door WHERE unitId = ?)");
      statement.setInt(1, getId());
      rset = statement.executeQuery();
      while(rset.next())
      {
        upgradeDoor(rset.getInt("doorId"), rset.getInt("hp"), false);
      }
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.