Package l2p.database

Examples of l2p.database.ThreadConnection.prepareStatement()


                                subStatement.executeUpdate();
                                DatabaseUtils.closeStatement(subStatement);
                        }
                        DatabaseUtils.closeDatabaseSR(statement, rset);
                        // Delete Account
                        statement = con.prepareStatement("DELETE FROM accounts WHERE login=?;");
                        statement.setEscapeProcessing(true);
                        statement.setString(1, account);
                        statement.executeUpdate();
                        System.out.println("Account \"" + account + "\" Deleted\n\n");
                }
View Full Code Here


    ThreadConnection con = null;
    FiltredPreparedStatement st = null;
    try
    {
      con = L2DatabaseFactory.getInstance().getConnection();
      st = con.prepareStatement("DELETE FROM character_quests WHERE name=? AND (var='spawned' OR var='kills' OR var='Archon' OR var LIKE 'Mob_%')");
      st.setString(1, getName());
      st.executeUpdate();
    }
    catch(Exception e)
    {
View Full Code Here

    FiltredPreparedStatement statement = null;
    ResultSet rset = null;
    try
    {
      con = L2DatabaseFactory.getInstance().getConnection();
      statement = con.prepareStatement("SELECT * FROM lastimperialtomb_spawnlist");
      rset = statement.executeQuery();
      int npcTemplateId;
      L2Spawn spawnDat;
      L2NpcTemplate npcTemplate;
      while(rset.next())
View Full Code Here

    FiltredPreparedStatement fps = null;
    ResultSet rs = null;
    try
    {
      tc = L2DatabaseFactory.getInstance().getConnection();
      fps = tc.prepareStatement("SELECT * FROM characters ORDER BY pvpkills DESC LIMIT 20;");
      rs = fps.executeQuery();
      StringBuilder sb = new StringBuilder();
      sb.append("<table width=650>");
      sb.append("<tr><td><center>ТОП 20 PVP");
      sb.append("<img src=L2UI.SquareWhite width=450 height=1>");
View Full Code Here

    FiltredPreparedStatement fps = null;
    ResultSet rs = null;
    try
    {
      tc = L2DatabaseFactory.getInstance().getConnection();
      fps = tc.prepareStatement("SELECT * FROM characters ORDER BY pkkills DESC LIMIT 20;");
      rs = fps.executeQuery();
      StringBuilder sb = new StringBuilder();
      sb.append("<table width=650>");
      sb.append("<tr><td><center>ТОП 20 PK");
      sb.append("<img src=L2UI.SquareWhite width=450 height=1>");
View Full Code Here

    FiltredPreparedStatement fps = null;
    ResultSet rs = null;
    try
    {
      tc = L2DatabaseFactory.getInstance().getConnection();
      fps = tc.prepareStatement("SELECT cha.char_name, cha.sex, cha.onlinetime, cha.pkkills, cha.pvpkills, cha.online FROM characters cha, olympiad_nobles oly WHERE cha.obj_Id = oly.char_id ORDER BY cha.pvpkills DESC LIMIT 20");
      rs = fps.executeQuery();
      StringBuilder sb = new StringBuilder();
      sb.append("<table width=650>");
      sb.append("<tr><td><center>ТОП 20 Дворян");
      sb.append("<img src=L2UI.SquareWhite width=450 height=1>");
View Full Code Here

    FiltredPreparedStatement fps = null;
    ResultSet rs = null;
    try
    {
      tc = L2DatabaseFactory.getInstance().getConnection();
      fps = tc.prepareStatement("SELECT * FROM castle ORDER BY id DESC LIMIT 10;");
      rs = fps.executeQuery();
      StringBuilder sb = new StringBuilder();
      sb.append("<table width=650>");
      sb.append("<tr><td><center>Статистика Замков");
      sb.append("<img src=L2UI.SquareWhite width=450 height=1>");
View Full Code Here

    FiltredPreparedStatement fps = null;
    ResultSet rs = null;
    try
    {
      tc = L2DatabaseFactory.getInstance().getConnection();
      fps = tc.prepareStatement("SELECT * FROM clan_data c WHERE c.clan_level > 0 ORDER BY c.clan_level DESC LIMIT 10;");
      rs = fps.executeQuery();
      StringBuilder sb = new StringBuilder();
      sb.append("<table width=650>");
      sb.append("<tr><td><center>Топ 10 Кланов");
      sb.append("<img src=L2UI.SquareWhite width=450 height=1>");
View Full Code Here

    FiltredPreparedStatement fps = null;
    ResultSet rs = null;
    try
    {
      tc = L2DatabaseFactory.getInstance().getConnection();
      fps = tc.prepareStatement("SELECT * FROM characters ORDER BY fame DESC LIMIT 20;");
      rs = fps.executeQuery();
      StringBuilder sb = new StringBuilder();
      sb.append("<table width=650>");
      sb.append("<tr><td><center>ТОП 20 Славы");
      sb.append("<img src=L2UI.SquareWhite width=450 height=1>");
View Full Code Here

    FiltredPreparedStatement statement = null;
    ResultSet rset = null;
    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]);
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.