L2JDP Revision Number: L2J Interlude
Hi all. I have a some problem with sql. Who can help?
How to write inquiry for loading from base of a variable for each character?
Sorry for my English

I need only code of loading a parameter from database. I want to load for each characters a parameter, which influences on a chance of level up of soul crystals. I want to place this code to L2Attackable.javaTryskell wrote:Consider to give FAR more details, cause like that... It means nothing.
Gl anyway.
Code: Select all
Connection con = null; try { con = L2DatabaseFactory.getInstance().getConnection(); PreparedStatement statement = con.prepareStatement("write your SQL query here"); ResultSet result = statement.executeQuery(); while (result.next()) { // Do your blabla here (based on your previous query, it must refer to each player) } result.close(); statement.close(); } catch (Exception e) { _log.log(Level.SEVERE, "Error on blabla: ", e); } finally { try { con.close(); } catch (Exception e) {} }