• 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!

SQL: Guilds Storage Question

xKnightmarex

New Member
Joined
Mar 11, 2013
Messages
94
Reaction score
3
I'm running TFS, and I can't seem to find where what guild you are in is stored in the database. I'm trying to create a trigger so that when you join the guild you will be added to the guildhall list to enter. Unfortunately I cannot figure out what table I should put the trigger on because I cannot figure out where what guild you are in is stored... I assumed players but I can only find rank_id and guildnick.

Any help would be apprecaited!
 
Guild_ranks
Guilds
And players
In players the rank_id is identified through Guild_ranks and in guild ranks the guild id is identified with the Id in the table guilds
 
so are guild ranks unique then? I thought it was just a number corresponding with how high you are in the guild. (i.e. leader is 3) meaning I could have two different leaders both with the rank_id of 3?

- - - Updated - - -

CREATE DEFINER=`root`@`127.0.0.1`
TRIGGER `guildhall_invite`
AFTER UPDATE ON `players`
FOR EACH ROW
BEGIN
if( rank_id = 1 OR rank_id = 2 OR rank_id = 3 )
{ INSERT INTO `house_lists` (`house_id`, `listid`, `list`) VALUES ('113', NEW.`id`, 'name'); }
ELSE{ INSERT INTO `house_lists` (`house_id`, `listid`, `list`) VALUES ('114', NEW.`id`, 'name'); }
END



any ideas why this doesn't work?
 
Last edited:
Ughm I believe NEW.'id' is incorrect wouldn't it just be new? In those marks sorry I am on my phone and when I'm on my pc I will better look
 
Back
Top