2 Servers at one login?

This is not a Support area! Discuss about the Server here. Non-Server related discussion goes in Off-Topic Discussion.
Forum rules
READ NOW: L2j Forums Rules of Conduct
Post Reply
User avatar
UnAfraid
L2j Veteran
L2j Veteran
Posts: 4199
Joined: Mon Jul 23, 2007 4:25 pm
Location: Bulgaria
Contact:

2 Servers at one login?

Post by UnAfraid »

Hello first i'm starting this thread because i need an idea ( i will explain it down there )
I'm basely web developer and i'm working on admin panel (web based) it's working fine with one server but..
when we have second server he don't have table `accounts` because is on another mysql server (in most of times) and i cant get information that i need in this way.
So how can i update information like an password getting last ip joining query's with accounts table information etc..

Is anyone have an idea how can i solve that problem please share it with me :)
Image
_DS_
L2j Veteran
L2j Veteran
Posts: 3437
Joined: Wed Apr 30, 2008 8:53 am
Location: Russia

Re: 2 Servers at one login?

Post by _DS_ »

I does not understand what you want. One login server - one account table.
Commiter of the shit
public static final int PI = 3.1415926535897932384626433832795;
User avatar
JIV
L2j Veteran
L2j Veteran
Posts: 1882
Joined: Sun Jan 06, 2008 8:17 pm
Location: Slovakia
Contact:

Re: 2 Servers at one login?

Post by JIV »

LS and GS database doesn't have to be on same machine. If you are on second and need LS db connect to it.
User avatar
UnAfraid
L2j Veteran
L2j Veteran
Posts: 4199
Joined: Mon Jul 23, 2007 4:25 pm
Location: Bulgaria
Contact:

Re: 2 Servers at one login?

Post by UnAfraid »

ok how can i run that query on a slave server that it don't have access to table `accounts`

and it isnt on the same server

how can i join that information ..

Code: Select all

  $acc_arr = $DB->GetAll('        SELECT            `c`.`accesslevel`,            `c`.`charId`,            `c`.`char_name`,            `c`.`level`,            `a`.`login`,            `a`.`accessLevel`,            `a`.`lastactive`,            `a`.`lastIp`        FROM            `characters` AS `c`	LEFT JOIN            `accounts` AS `a`	ON	     `a`.`login` = `c`.`account_name`        WHERE            `a`.`login` LIKE ?    ', array($account));
Image
Post Reply