Page 1 of 1

2 Servers at one login?

Posted: Fri Aug 06, 2010 11:02 pm
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 :)

Re: 2 Servers at one login?

Posted: Tue Aug 10, 2010 7:56 pm
by _DS_
I does not understand what you want. One login server - one account table.

Re: 2 Servers at one login?

Posted: Tue Aug 10, 2010 10:05 pm
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.

Re: 2 Servers at one login?

Posted: Wed Aug 11, 2010 12:53 am
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));