diff --git a/db/db_base.cpp b/db/db_base.cpp index 05bcd44727..007a5f69bc 100644 --- a/db/db_base.cpp +++ b/db/db_base.cpp @@ -153,7 +153,7 @@ int DB_CONN::affected_rows() { return (int)x; } -int DB_CONN::insert_id() { +DB_ID_TYPE DB_CONN::insert_id() { int retval; MYSQL_ROW row; MYSQL_RES* rp; @@ -162,7 +162,7 @@ int DB_CONN::insert_id() { if (retval) return retval; rp = mysql_store_result(mysql); row = mysql_fetch_row(rp); - int x = atoi(row[0]); + DB_ID_TYPE x = atol(row[0]); mysql_free_result(rp); return x; } diff --git a/db/db_base.h b/db/db_base.h index c65ac8fcc3..6af3a4330e 100644 --- a/db/db_base.h +++ b/db/db_base.h @@ -71,7 +71,7 @@ public: int do_query(const char*); int affected_rows(); void close(); - int insert_id(); + DB_ID_TYPE insert_id(); void print_error(const char*); const char* error_string(); int ping();