Merge branch 'RunQueryToDatabaseQuery_database' of https://github.com/addtheice/Server into DBQuery

This commit is contained in:
KimLS 2014-08-10 16:27:59 -07:00
commit 26ff1ae941

View File

@ -119,7 +119,10 @@ MySQLRequestResult DBcore::QueryDatabase(const char* query, uint32 querylen, boo
// successful query. get results.
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