diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-04-30 21:59:38 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-04-30 21:59:38 +0000 |
commit | f7b04e5d93dcbd158f117da3e5821742a74e3f38 (patch) | |
tree | 306c0f63c04f247f5436fb3f73e86e329c3ca626 /src | |
parent | e971d1a413c6454bb305f76c331385fe39b2ca6b (diff) |
change to ability for QueryCount to return -1 for both of the 1.1 sql api's
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3921 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r-- | src/modules/extra/m_sql.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/modules/extra/m_sql.h b/src/modules/extra/m_sql.h index e1a8b0efd..49782b9b4 100644 --- a/src/modules/extra/m_sql.h +++ b/src/modules/extra/m_sql.h @@ -69,10 +69,11 @@ class SQLResult { protected: int resptype; - unsigned long count; + long count; std::string error; std::map<std::string,std::string> row; public: + void SetRow(std::map<std::string,std::string> r) { row = r; @@ -105,12 +106,13 @@ class SQLResult return error; } - void SetCount(unsigned long c) + void SetCount(long c) { count = c; } - unsigned long GetCount() + /* This will return a negative value of the SQL server is down */ + long GetCount() { return count; } @@ -199,7 +201,7 @@ class SQLQuery return rowresult->GetField(fname); } - int GetCount() + long GetCount() { rowresult = (SQLResult*)rowquery->Send(); if (rowresult->GetType() == SQL_COUNT) |