Package l2p.database

Examples of l2p.database.FiltredPreparedStatement.executeQuery()


      {
        _fishsEasy = new GArray<FishData>();
        _fishsNormal = new GArray<FishData>();
        _fishsHard = new GArray<FishData>();
        statement = con.prepareStatement("SELECT id, level, name, hp, hpregen, fish_type, fish_group, fish_guts, guts_check_time, wait_time, combat_time FROM fish ORDER BY id");
        resultSet = statement.executeQuery();
        while(resultSet.next())
        {
          int id = resultSet.getInt("id");
          int lvl = resultSet.getInt("level");
          String name = resultSet.getString("name");
View Full Code Here


      try
      {
        _fishRewards = new GArray<FishDropData>();
        FishDropData fishreward;
        statement = con.prepareStatement("SELECT fishid, rewardid, min, max, chance FROM fishreward ORDER BY fishid");
        resultSet = statement.executeQuery();
        while(resultSet.next())
        {
          short fishid = resultSet.getShort("fishid");
          short rewardid = resultSet.getShort("rewardid");
          int mindrop = resultSet.getInt("min");
View Full Code Here

    try
    {
      con = L2DatabaseFactory.getInstance().getConnection();
      statement = con.prepareStatement("SELECT target_Id, char_name FROM character_blocklist LEFT JOIN characters ON ( character_blocklist.target_Id = characters.obj_Id ) WHERE character_blocklist.obj_Id = ?");
      statement.setInt(1, getObjectId());
      rs = statement.executeQuery();
      while(rs.next())
      {
        _blockList.put(rs.getInt("target_Id"), rs.getString("char_name"));
      }
    }
View Full Code Here

    try
    {
      con = L2DatabaseFactory.getInstance().getConnection();
      offline = con.prepareStatement("SELECT * FROM character_variables WHERE obj_id = ?");
      offline.setInt(1, _objectId);
      rs = offline.executeQuery();
      while(rs.next())
      {
        String name = rs.getString("name");
        String value = Strings.stripSlashes(rs.getString("value"));
        user_variables.put(name, value);
View Full Code Here

    try
    {
      con = L2DatabaseFactory.getInstance().getConnection();
      statement = con.prepareStatement("SELECT class_id,exp,sp,level,curHp,curCp,curMp,active,isBase,death_penalty,skills FROM character_subclasses WHERE char_obj_id=?");
      statement.setInt(1, player.getObjectId());
      rset = statement.executeQuery();
      while(rset.next())
      {
        final L2SubClass subClass = new L2SubClass();
        subClass.setBase(rset.getInt("isBase") != 0);
        subClass.setClassId(rset.getShort("class_id"));
View Full Code Here

    ResultSet result = null;
    try
    {
      con = L2DatabaseFactory.getInstance().getConnection();
      statement = con.prepareStatement("SELECT clan_id FROM clan_data");
      result = statement.executeQuery();
      while(result.next())
      {
        clanIds.add(result.getInt("clan_id"));
      }
    }
View Full Code Here

    ResultSet result = null;
    try
    {
      con = L2DatabaseFactory.getInstance().getConnection();
      statement = con.prepareStatement("SELECT ally_id FROM ally_data");
      result = statement.executeQuery();
      while(result.next())
      {
        allyIds.add(result.getInt("ally_id"));
      }
    }
View Full Code Here

    ResultSet rset = null;
    try
    {
      con = L2DatabaseFactory.getInstance().getConnection();
      statement = con.prepareStatement("SELECT clan1, clan2 FROM clan_wars");
      rset = statement.executeQuery();
      L2Clan clan1;
      L2Clan clan2;
      while(rset.next())
      {
        clan1 = getClan(rset.getInt("clan1"));
View Full Code Here

    ResultSet rs = null;
    try
    {
      con = L2DatabaseFactory.getInstance().getConnection();
      statement = con.prepareStatement("SELECT * FROM server_variables");
      rs = statement.executeQuery();
      while(rs.next())
      {
        server_vars.set(rs.getString("name"), rs.getString("value"));
      }
    }
View Full Code Here

      // Send the SQL query : SELECT skill_id,skill_level FROM character_skills WHERE char_obj_id=? to the database
      con = L2DatabaseFactory.getInstance().getConnection();
      statement = con.prepareStatement("SELECT skill_id,skill_level FROM character_skills WHERE char_obj_id=? AND class_index=?");
      statement.setInt(1, getObjectId());
      statement.setInt(2, getActiveClassId());
      rset = statement.executeQuery();
      // Go though the recordset of this SQL query
      while(rset.next())
      {
        final int id = rset.getInt("skill_id");
        final int level = rset.getInt("skill_level");
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.