Package l2p.database

Examples of l2p.database.FiltredPreparedStatement.execute()


      statement.setString(3, date);
      statement.setString(4, enddate);
      statement.setString(5, msg);
      statement.setString(6, GM);
      statement.setLong(7, endban);
      statement.execute();
    }
    catch(Exception e)
    {
      _log.warning("could not store bans data:" + e);
    }
View Full Code Here


          statement.setString(2, date);
          statement.setString(3, enddate);
          statement.setString(4, msg);
          statement.setString(5, GM);
          statement.setLong(6, endban);
          statement.execute();
        }
        else
        {
          statement = con.prepareStatement("DELETE FROM bans WHERE obj_id=?");
          statement.setInt(1, obj_id);
View Full Code Here

        }
        else
        {
          statement = con.prepareStatement("DELETE FROM bans WHERE obj_id=?");
          statement.setInt(1, obj_id);
          statement.execute();
        }
      }
      catch(Exception e)
      {
        e.printStackTrace();
View Full Code Here

      statement.setString(1, actor.getAccountName());
      statement.setInt(2, actor.getObjectId());
      statement.setString(3, date);
      statement.setString(4, msg);
      statement.setString(5, GM);
      statement.execute();
    }
    catch(Exception e)
    {
      _log.warning("could not store bans data:" + e);
    }
View Full Code Here

      {
        con = L2DatabaseFactory.getInstance().getConnection();
        statement = con.prepareStatement("update characters set karma=karma + ? where obj_Id=?");
        statement.setInt(1, karma);
        statement.setInt(2, obj_id);
        statement.execute();
        DatabaseUtils.closeStatement(statement);
        String date = new SimpleDateFormat("yy.MM.dd H:mm:ss").format(new Date());
        msg = "Add karma(" + karma + ") " + msg;
        statement = con.prepareStatement("INSERT INTO bans (obj_id, baned, reason, GM) VALUES(?,?,?,?)");
        statement.setInt(1, obj_id);
View Full Code Here

        statement = con.prepareStatement("INSERT INTO bans (obj_id, baned, reason, GM) VALUES(?,?,?,?)");
        statement.setInt(1, obj_id);
        statement.setString(2, date);
        statement.setString(3, msg);
        statement.setString(4, GM);
        statement.execute();
      }
      catch(Exception e)
      {
        _log.warning("could not store bans data:" + e);
        res = false;
View Full Code Here

        statement = con.prepareStatement("INSERT DELAYED INTO " + Config.LOG_CHAT_DB + " (`type`,`text`,`from`,`to`) VALUES(?,?,?,?);");
        statement.setString(1, type.trim());
        statement.setString(2, text);
        statement.setString(3, from);
        statement.setString(4, to != null ? to : "");
        statement.execute();
      }
      catch(Exception e)
      {
        _log.warning("fail to sql log chat[" + type + "|" + text + "|" + from + "|" + to + "]: " + e);
        e.printStackTrace();
View Full Code Here

      con = L2DatabaseFactory.getInstance().getConnection();
      statement = con.prepareStatement("REPLACE INTO epic_boss_spawn (bossId,respawnDate,state) VALUES(?,?,?)");
      statement.setInt(1, _bossId);
      statement.setInt(2, (int) (_respawnDate / 1000));
      statement.setInt(3, _state.ordinal());
      statement.execute();
      statement.close();
    }
    catch(Exception e)
    {
      _log.error(e.getMessage(), e);
View Full Code Here

      removeItem(player, 13015, 1);
      player.logout(false, false, false, true);
      con = L2DatabaseFactory.getInstance().getConnection();
      statement = con.prepareStatement("UPDATE characters SET bookmarks = bookmarks+3 WHERE obj_Id=?");
      statement.setInt(1, player.getObjectId());
      statement.execute();
      DatabaseUtils.closeStatement(statement);
      //player.updateStats();
      //player.sendChanges();
      player.broadcastUserInfo(true);
      player.sendPacket(new SystemMessage(msg));
View Full Code Here

    try
    {
      con = L2DatabaseFactory.getInstance().getConnection();
      statement = con.prepareStatement("DELETE FROM pets WHERE item_obj_id=?");
      statement.setInt(1, getControlItemObjId());
      statement.execute();
    }
    catch(Exception e)
    {
      _log.warning("could not delete pet:" + 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.