summaryrefslogtreecommitdiff
path: root/src/char/int_party.c
diff options
context:
space:
mode:
authorshennetsind <ind@henn.et>2013-05-16 16:10:51 -0300
committershennetsind <ind@henn.et>2013-05-16 16:10:51 -0300
commitf03d4212e214245ab1b16c8d0ccb8e087f714f23 (patch)
tree081b48a7431e6e711e5522b64fa4e1e88847264b /src/char/int_party.c
parent4424ef2ce2cd65666145a0a0c6ba8d05669f1fb8 (diff)
downloadhercules-f03d4212e214245ab1b16c8d0ccb8e087f714f23.tar.gz
hercules-f03d4212e214245ab1b16c8d0ccb8e087f714f23.tar.bz2
hercules-f03d4212e214245ab1b16c8d0ccb8e087f714f23.tar.xz
hercules-f03d4212e214245ab1b16c8d0ccb8e087f714f23.zip
Fixed Bug #7250
Screwed up. http://hercules.ws/board/tracker/issue-7250-cant-create-party-and-guild/ Follow up 0aee4fd57f2f4135361f4182a08a98cf52ed9d10 Signed-off-by: shennetsind <ind@henn.et>
Diffstat (limited to 'src/char/int_party.c')
-rw-r--r--src/char/int_party.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/char/int_party.c b/src/char/int_party.c
index 7f99590ab..29b00e0a9 100644
--- a/src/char/int_party.c
+++ b/src/char/int_party.c
@@ -150,7 +150,7 @@ int inter_party_tosql(struct party *p, int flag, int index)
Sql_ShowDebug(sql_handle);
return 0;
}
- party_id = p->party_id = (int)SQL->NumRows(sql_handle);
+ party_id = p->party_id = (int)SQL->LastInsertId(sql_handle);
}
if( flag & PS_BASIC )
@@ -295,8 +295,7 @@ struct party_data* search_partyname(char* str)
SQL->EscapeStringLen(sql_handle, esc_name, str, safestrnlen(str, NAME_LENGTH));
if( SQL_ERROR == SQL->Query(sql_handle, "SELECT `party_id` FROM `%s` WHERE `name`='%s'", party_db, esc_name) )
Sql_ShowDebug(sql_handle);
- else if( SQL_SUCCESS == SQL->NextRow(sql_handle) )
- {
+ else if( SQL_SUCCESS == SQL->NextRow(sql_handle) ) {
SQL->GetData(sql_handle, 0, &data, NULL);
p = inter_party_fromsql(atoi(data));
}