• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Windows Sql get column value from accounts

Nekiro

Legendary OT User
TFS Developer
Joined
Sep 7, 2015
Messages
2,759
Solutions
127
Reaction score
2,279
Hello i have question is it possible to add column name 'account_id' which is getting id from 'accounts' table based on player_id column in my table?
in SQL

Something like return account id from player id
 
How to create new table based on number from accounts table and ID column?
Something like players_online table and player_id column. Its receiving player id of player online but i need to receive player account id from player online ;x

bae8e04d2ccc3a178c3ac409bd22ffaa.png

like this one player id = 24 and account id = 2 its player table.
 
id from players_online, account_id from players and character name from players

Code:
SELECT players_online.player_id as id, players.account_id, players.name FROM `players_online` INNER JOIN `players` ON players_online.player_id=players.id
 
Last edited by a moderator:
Back
Top