Jump to content
  • 0

Delete Recipes From Database


T9Text

Question

How can i do method to delete all recipe from any crafter?

 

public static void DeleteRecpe(L2PcInstance activeChar)
{
        try (Connection con = L2DatabaseFactory.getInstance().getConnection())
        {
        	PreparedStatement statement = con.prepareStatement("DELETE FROM character_recipebook WHERE char_obj_id=?");
        	statement.setInt(1, activeChar.getObjectId());
        	statement.execute();
        	statement.close();
        }
        catch (Exception e)
        {
                _log.log(Level.WARNING,"Something went wrong", e);
        }
}

Its something like this ? 

Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now


×
×
  • Create New...