Jump to content
  • 0

[HELP] Community server query GS database


Question

Posted

L2J Community Server version=4912M

 

Hello, ive got i little problem:

 

im trying to query the gameserver database from the community server :

 

private void loadFromDB(int type) {
      java.sql.Connection con = null;
      String top;
      if (type==0)
         top = "database_stat1";
      else
         top = "database_stat2";
      try
      {
         _posId = 0;
         con = L2DatabaseFactory.getInstance().getConnection();
         PreparedStatement statement = con.prepareStatement("SELECT c.char_name, c.base_class, c."+top+", c.level, c.online, cl.clan_name, cl.ally_name FROM characters c LEFT 
         JOIN clan_data cl ON cl.clan_id=c.clanid WHERE c.accesslevel=0 ORDER BY c."+top+" DESC, c.char_name ASC LIMIT 10");

      }

 

But this connects to my "l2jcs" databse ad obviusly there isnt any tables called characters, how can i modify this to connect to my "l2jgs"? ty any help would be great

 

-Ricky

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock