Package l2p.database

Examples of l2p.database.FiltredPreparedStatement.execute()


        try
        {
          con = L2DatabaseFactory.getInstance().getConnection();
          statement = con.prepareStatement("UPDATE characters SET clanid = 0 WHERE clanid=?");
          statement.setInt(1, target.getClanId());
          statement.execute();
          DatabaseUtils.closeStatement(statement);
          statement = con.prepareStatement("DELETE FROM clan_data WHERE clan_id=?");
          statement.setInt(1, target.getClanId());
          statement.execute();
          DatabaseUtils.closeStatement(statement);
View Full Code Here


          statement.setInt(1, target.getClanId());
          statement.execute();
          DatabaseUtils.closeStatement(statement);
          statement = con.prepareStatement("DELETE FROM clan_data WHERE clan_id=?");
          statement.setInt(1, target.getClanId());
          statement.execute();
          DatabaseUtils.closeStatement(statement);
          statement = null;
          target.sendPacket(Msg.CLAN_HAS_DISPERSED);
          target.broadcastUserInfo(true);
        }
View Full Code Here

    try
    {
      con = L2DatabaseFactory.getInstance().getConnection();
      statement = con.prepareStatement(cmd);
      statement.setString(1, wordList[1]);
      statement.execute();
      DatabaseUtils.closeStatement(statement);
      statement = con.prepareStatement("SELECT obj_id FROM characters where char_name=?");
      statement.setString(1, wordList[1]);
      rset = statement.executeQuery();
      int objId = 0;
View Full Code Here

        return false;
      }
      // con = L2DatabaseFactory.getInstance().getConnection();
      statement = con.prepareStatement("DELETE FROM character_shortcuts WHERE char_obj_id=?");
      statement.setInt(1, objId);
      statement.execute();
      DatabaseUtils.closeStatement(statement);
      // con = L2DatabaseFactory.getInstance().getConnection();
      statement = con.prepareStatement("UPDATE items SET loc='INVENTORY' WHERE owner_id=? AND loc!='WAREHOUSE'");
      statement.setInt(1, objId);
      statement.execute();
View Full Code Here

      statement.execute();
      DatabaseUtils.closeStatement(statement);
      // con = L2DatabaseFactory.getInstance().getConnection();
      statement = con.prepareStatement("UPDATE items SET loc='INVENTORY' WHERE owner_id=? AND loc!='WAREHOUSE'");
      statement.setInt(1, objId);
      statement.execute();
    }
    catch(Exception e)
    {
      e.printStackTrace();
    }
View Full Code Here

      statement.setInt(3, shortcut.page);
      statement.setInt(4, shortcut.type);
      statement.setInt(5, shortcut.id);
      statement.setInt(6, shortcut.level);
      statement.setInt(7, player.getActiveClassId());
      statement.execute();
    }
    catch(Exception e)
    {
      _log.log(Level.WARNING, "could not store shortcuts:", e);
    }
View Full Code Here

      statement = con.prepareStatement("DELETE FROM character_shortcuts WHERE char_obj_id=? AND slot=? AND page=? AND class_index=?");
      statement.setInt(1, player.getObjectId());
      statement.setInt(2, shortcut.slot);
      statement.setInt(3, shortcut.page);
      statement.setInt(4, player.getActiveClassId());
      statement.execute();
    }
    catch(Exception e)
    {
      _log.log(Level.WARNING, "could not delete shortcuts:", e);
    }
View Full Code Here

    {
      con = L2DatabaseFactory.getInstance().getConnection();
      statement = con.prepareStatement("REPLACE INTO siege_doorupgrade (doorId, hp) VALUES (?,?)");
      statement.setInt(1, doorId);
      statement.setInt(2, hp);
      statement.execute();
    }
    catch(Exception e)
    {
      _log.warning("Exception: saveDoorUpgrade(int doorId, int hp): " + e);
    }
View Full Code Here

        statement = con.prepareStatement("REPLACE residence_functions SET id=?, type=?, lvl=?, endTime=?");
        statement.setInt(1, getId());
        statement.setInt(2, type);
        statement.setInt(3, level);
        statement.setInt(4, (int) (time / 1000));
        statement.execute();
        function.setLvl(level);
        function.setEndTimeInMillis(time);
        function.setActive(true);
        StartAutoTaskForFunction(function);
      }
View Full Code Here

        }
        statement = con.prepareStatement("REPLACE residence_functions SET id=?, type=?, lvl=?");
        statement.setInt(1, getId());
        statement.setInt(2, type);
        statement.setInt(3, level);
        statement.execute();
        function.setLvl(level);
      }
    }
    catch(Exception e)
    {
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.