Package l2p.database

Examples of l2p.database.FiltredPreparedStatement.executeUpdate()


      st = con.prepareStatement("UPDATE characters SET x=?,y=?,z=? WHERE obj_Id=? LIMIT 1");
      st.setInt(1, loc.x);
      st.setInt(2, loc.y);
      st.setInt(3, loc.z);
      st.setInt(4, obj_id);
      st.executeUpdate();
    }
    catch(Exception e)
    {
      e.printStackTrace();
    }
View Full Code Here


                        statement = con.prepareStatement("REPLACE  accounts (login, password, access_level, comments) VALUES (?,?,?,?)");
                        statement.setString(1, account);
                        statement.setString(2, Base64.encodeBytes(newpass));
                        statement.setString(3, level);
                        statement.setString(4, comments);
                        statement.executeUpdate();
                }
                finally
                {
                        DatabaseUtils.closeDatabaseCS(con, statement);
                }
View Full Code Here

                                // Update
                                statement = con.prepareStatement("UPDATE accounts SET access_level=? WHERE login=?;");
                                statement.setEscapeProcessing(true);
                                statement.setString(1, level);
                                statement.setString(2, account);
                                statement.executeUpdate();
                                System.out.println("Account \"" + account + "\" Updated\n");
                        }
                        else
                        // Not Exist
                        {
View Full Code Here

                                        // Delete Clan Wars
                                        subStatement = con.prepareStatement("DELETE FROM clan_wars WHERE clan1=? OR clan2=?;");
                                        subStatement.setEscapeProcessing(true);
                                        subStatement.setString(1, clanName);
                                        subStatement.setString(2, clanName);
                                        subStatement.executeUpdate();
                                        DatabaseUtils.closeStatement(subStatement);
                                        // Remove All From clan
                                        subStatement = con.prepareStatement("UPDATE characters SET clanid=0 WHERE clanid=?;");
                                        subStatement.setString(1, rset.getString("clanid"));
                                        subStatement.executeUpdate();
View Full Code Here

                                        subStatement.executeUpdate();
                                        DatabaseUtils.closeStatement(subStatement);
                                        // Remove All From clan
                                        subStatement = con.prepareStatement("UPDATE characters SET clanid=0 WHERE clanid=?;");
                                        subStatement.setString(1, rset.getString("clanid"));
                                        subStatement.executeUpdate();
                                        DatabaseUtils.closeStatement(subStatement);
                                        // Delete Clan
                                        subStatement = con.prepareStatement("DELETE FROM clan_data WHERE clan_id=?;");
                                        subStatement.setString(1, rset.getString("clanid"));
                                        subStatement.executeUpdate();
View Full Code Here

                                        subStatement.executeUpdate();
                                        DatabaseUtils.closeStatement(subStatement);
                                        // Delete Clan
                                        subStatement = con.prepareStatement("DELETE FROM clan_data WHERE clan_id=?;");
                                        subStatement.setString(1, rset.getString("clanid"));
                                        subStatement.executeUpdate();
                                        DatabaseUtils.closeStatement(subStatement);
                                }
                                // skills
                                subStatement = con.prepareStatement("DELETE FROM character_skills WHERE char_obj_id=?;");
                                subStatement.setString(1, rset.getString("obj_Id"));
View Full Code Here

                                        DatabaseUtils.closeStatement(subStatement);
                                }
                                // skills
                                subStatement = con.prepareStatement("DELETE FROM character_skills WHERE char_obj_id=?;");
                                subStatement.setString(1, rset.getString("obj_Id"));
                                subStatement.executeUpdate();
                                DatabaseUtils.closeStatement(subStatement);
                                // shortcuts
                                subStatement = con.prepareStatement("DELETE FROM character_shortcuts WHERE char_obj_id=?;");
                                subStatement.setString(1, rset.getString("obj_Id"));
                                subStatement.executeUpdate();
View Full Code Here

                                subStatement.executeUpdate();
                                DatabaseUtils.closeStatement(subStatement);
                                // shortcuts
                                subStatement = con.prepareStatement("DELETE FROM character_shortcuts WHERE char_obj_id=?;");
                                subStatement.setString(1, rset.getString("obj_Id"));
                                subStatement.executeUpdate();
                                DatabaseUtils.closeStatement(subStatement);
                                // items
                                subStatement = con.prepareStatement("DELETE FROM items WHERE owner_id=?;");
                                subStatement.setString(1, rset.getString("obj_Id"));
                                subStatement.executeUpdate();
View Full Code Here

                                subStatement.executeUpdate();
                                DatabaseUtils.closeStatement(subStatement);
                                // items
                                subStatement = con.prepareStatement("DELETE FROM items WHERE owner_id=?;");
                                subStatement.setString(1, rset.getString("obj_Id"));
                                subStatement.executeUpdate();
                                DatabaseUtils.closeStatement(subStatement);
                                // recipebook
                                subStatement = con.prepareStatement("DELETE FROM character_recipebook WHERE char_id=?;");
                                subStatement.setString(1, rset.getString("obj_Id"));
                                subStatement.executeUpdate();
View Full Code Here

                                subStatement.executeUpdate();
                                DatabaseUtils.closeStatement(subStatement);
                                // recipebook
                                subStatement = con.prepareStatement("DELETE FROM character_recipebook WHERE char_id=?;");
                                subStatement.setString(1, rset.getString("obj_Id"));
                                subStatement.executeUpdate();
                                DatabaseUtils.closeStatement(subStatement);
                                // quests
                                subStatement = con.prepareStatement("DELETE FROM character_quests WHERE char_id=?;");
                                subStatement.setString(1, rset.getString("obj_Id"));
                                subStatement.executeUpdate();
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.