summaryrefslogtreecommitdiff
path: root/src/char_sql/int_guild.c
diff options
context:
space:
mode:
authorParadox924X <Paradox924X@54d463be-8e91-2dee-dedb-b68131a5f0ec>2010-10-11 01:57:27 +0000
committerParadox924X <Paradox924X@54d463be-8e91-2dee-dedb-b68131a5f0ec>2010-10-11 01:57:27 +0000
commitc4a2d76ad693f096f2d954a7c144f5dffc633391 (patch)
treecb2854cb8adb71b68b79f93f1e36ec78be9518cd /src/char_sql/int_guild.c
parent05c756b4b24222aeb65a5aeda09f5a1e4f2a4138 (diff)
downloadhercules-c4a2d76ad693f096f2d954a7c144f5dffc633391.tar.gz
hercules-c4a2d76ad693f096f2d954a7c144f5dffc633391.tar.bz2
hercules-c4a2d76ad693f096f2d954a7c144f5dffc633391.tar.xz
hercules-c4a2d76ad693f096f2d954a7c144f5dffc633391.zip
Pull `name` from character table instead of using `master` from guild table when loading guild data.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14417 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/char_sql/int_guild.c')
-rw-r--r--src/char_sql/int_guild.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/char_sql/int_guild.c b/src/char_sql/int_guild.c
index 93a4c9ded..8c165e92c 100644
--- a/src/char_sql/int_guild.c
+++ b/src/char_sql/int_guild.c
@@ -382,8 +382,8 @@ struct guild * inter_guild_fromsql(int guild_id)
ShowInfo("Guild load request (%d)...\n", guild_id);
#endif
- if( SQL_ERROR == Sql_Query(sql_handle, "SELECT `name`,`master`,`guild_lv`,`connect_member`,`max_member`,`average_lv`,`exp`,`next_exp`,`skill_point`,`mes1`,`mes2`,`emblem_len`,`emblem_id`,`emblem_data` "
- "FROM `%s` WHERE `guild_id`='%d'", guild_db, guild_id) )
+ if( SQL_ERROR == Sql_Query(sql_handle, "SELECT g.`name`,c.`name`,g.`guild_lv`,g.`connect_member`,g.`max_member`,g.`average_lv`,g.`exp`,g.`next_exp`,g.`skill_point`,g.`mes1`,g.`mes2`,g.`emblem_len`,g.`emblem_id`,g.`emblem_data` "
+ "FROM `%s` g LEFT JOIN `%s` c ON c.`char_id` = g.`char_id` WHERE g.`guild_id`='%d'", guild_db, char_db, guild_id) )
{
Sql_ShowDebug(sql_handle);
return NULL;