mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-14 11:31:30 +00:00
Merge branch 'RunQueryToDatabaseQuery_database' of https://github.com/addtheice/Server into DBQuery
This commit is contained in:
commit
26ff1ae941
@ -119,7 +119,10 @@ MySQLRequestResult DBcore::QueryDatabase(const char* query, uint32 querylen, boo
|
|||||||
|
|
||||||
// successful query. get results.
|
// successful query. get results.
|
||||||
MYSQL_RES* res = mysql_store_result(&mysql);
|
MYSQL_RES* res = mysql_store_result(&mysql);
|
||||||
MySQLRequestResult requestResult(res, (uint32)mysql_affected_rows(&mysql), (uint32)mysql_num_rows(res), (uint32)mysql_field_count(&mysql), (uint32)mysql_insert_id(&mysql));
|
uint32 rowCount = 0;
|
||||||
|
if (res != nullptr)
|
||||||
|
rowCount = (uint32)mysql_num_rows(res);
|
||||||
|
MySQLRequestResult requestResult(res, (uint32)mysql_affected_rows(&mysql), rowCount, (uint32)mysql_field_count(&mysql), (uint32)mysql_insert_id(&mysql));
|
||||||
|
|
||||||
|
|
||||||
#if DEBUG_MYSQL_QUERIES >= 1
|
#if DEBUG_MYSQL_QUERIES >= 1
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user