summaryrefslogtreecommitdiff
path: root/src/map/itemdb.c
diff options
context:
space:
mode:
authorshennetsind <ind@henn.et>2013-06-09 00:55:03 -0300
committershennetsind <ind@henn.et>2013-06-09 00:55:03 -0300
commit2db09c2e6442aa3abe573d35a3a5a1c6fa3db5fa (patch)
treec7f5dbb515a926c04e2cd4f38872730e0e7c3429 /src/map/itemdb.c
parent89a571a3c5d4c9366843a462c40efdebb24d17fe (diff)
downloadhercules-2db09c2e6442aa3abe573d35a3a5a1c6fa3db5fa.tar.gz
hercules-2db09c2e6442aa3abe573d35a3a5a1c6fa3db5fa.tar.bz2
hercules-2db09c2e6442aa3abe573d35a3a5a1c6fa3db5fa.tar.xz
hercules-2db09c2e6442aa3abe573d35a3a5a1c6fa3db5fa.zip
Fixed Bug #7319
Special Thanks to KeiKun~! http://hercules.ws/board/tracker/issue-7319-db-name/ Signed-off-by: shennetsind <ind@henn.et>
Diffstat (limited to 'src/map/itemdb.c')
-rw-r--r--src/map/itemdb.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/map/itemdb.c b/src/map/itemdb.c
index 4b6275047..cb845111d 100644
--- a/src/map/itemdb.c
+++ b/src/map/itemdb.c
@@ -1293,14 +1293,13 @@ uint64 itemdb_unique_id(int8 flag, int64 value) {
return ++item_uid;
}
-int itemdb_uid_load(){
+int itemdb_uid_load() {
char * uid;
- if (SQL_ERROR == SQL->Query(mmysql_handle, "SELECT `value` FROM `interreg` WHERE `varname`='unique_id'"))
+ if (SQL_ERROR == SQL->Query(mmysql_handle, "SELECT `value` FROM `%s` WHERE `varname`='unique_id'",iMap->interreg_db))
Sql_ShowDebug(mmysql_handle);
- if( SQL_SUCCESS != SQL->NextRow(mmysql_handle) )
- {
+ if( SQL_SUCCESS != SQL->NextRow(mmysql_handle) ) {
ShowError("itemdb_uid_load: Unable to fetch unique_id data\n");
SQL->FreeResult(mmysql_handle);
return -1;