diff --git a/common/EQDB.cpp b/common/EQDB.cpp index 124f2e817..2e241aa2b 100644 --- a/common/EQDB.cpp +++ b/common/EQDB.cpp @@ -31,11 +31,11 @@ unsigned int EQDB::field_count() { } unsigned long EQDB::affected_rows() { - return mysql_affected_rows(mysql_ref); + return (unsigned long)mysql_affected_rows(mysql_ref); } unsigned long EQDB::insert_id() { - return mysql_insert_id(mysql_ref); + return (unsigned long)mysql_insert_id(mysql_ref); } unsigned int EQDB::get_errno() { diff --git a/common/EQDBRes.h b/common/EQDBRes.h index 67ce5f869..035ae6fe6 100644 --- a/common/EQDBRes.h +++ b/common/EQDBRes.h @@ -32,8 +32,8 @@ public: ~EQDBRes() { finish(); } //BEGIN PERL EXPORT - unsigned long num_rows() { return (res) ? mysql_num_rows(res) : 0; } - unsigned long num_fields() { return (res) ? mysql_num_fields(res) : 0; } + unsigned long num_rows() { return (res) ? (unsigned long)mysql_num_rows(res) : 0; } + unsigned long num_fields() { return (res) ? (unsigned long)mysql_num_fields(res) : 0; } void DESTROY() { } void finish() { if (res) mysql_free_result(res); res=nullptr; }; std::vector fetch_row_array();