mirror of
https://github.com/EQEmu/Server.git
synced 2026-04-27 16:32:27 +00:00
be sure to get the actual size of the query.
This commit is contained in:
parent
a372ba3d39
commit
2631861370
@ -74,7 +74,7 @@ bool DBcore::RunQuery(const std::string query, char* errbuf, MYSQL_RES** result,
|
||||
strn0cpy(tmp, query.c_str(), sizeof(tmp));
|
||||
std::cout << "QUERY: " << tmp << std::endl;
|
||||
#endif
|
||||
if (mysql_real_query(&mysql, query.c_str(), query.length())) {
|
||||
if (mysql_real_query(&mysql, query.c_str(), strlen(query.c_str()))) {
|
||||
if (mysql_errno(&mysql) == CR_SERVER_GONE_ERROR)
|
||||
pStatus = Error;
|
||||
if (mysql_errno(&mysql) == CR_SERVER_LOST || mysql_errno(&mysql) == CR_SERVER_GONE_ERROR) {
|
||||
|
||||
@ -1603,6 +1603,7 @@ void SharedDatabase::LoadDamageShieldTypes(SPDat_Spell_Struct* sp, int32 iMaxSpe
|
||||
StringFormat(query,"SELECT `spellid`, `type` from `damageshieldtypes` "
|
||||
"WHERE `spellid` > 0 AND `spellid` <= %i", iMaxSpellID);
|
||||
|
||||
|
||||
if(RunQuery(query,errbuf,&result)) {
|
||||
|
||||
while((row = mysql_fetch_row(result))) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user