diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/modules/extra/m_sql.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/modules/extra/m_sql.cpp b/src/modules/extra/m_sql.cpp index be43910de..d958e9092 100644 --- a/src/modules/extra/m_sql.cpp +++ b/src/modules/extra/m_sql.cpp @@ -92,9 +92,10 @@ class SQLConnection // This method issues a query that just expects a number of 'effected' rows (e.g. UPDATE or DELETE FROM). // the number of effected rows is returned in the return value. - unsigned long QueryCount(std::string query) + long QueryCount(std::string query) { - if (!CheckConnection()) return 0; + /* If the connection is down, we return a negative value - New to 1.1 */ + if (!CheckConnection()) return -1; int r = mysql_query(&connection, query.c_str()); if (!r) |