diff --git a/src/framework/sql/mysql.cpp b/src/framework/sql/mysql.cpp index 913b5094..69f05452 100644 --- a/src/framework/sql/mysql.cpp +++ b/src/framework/sql/mysql.cpp @@ -176,7 +176,7 @@ uint64_t DatabaseMySQL::getLastInsertedRowID() std::string DatabaseMySQL::escapeString(const std::string &s) { - return escapeBlob( s.c_str(), s.length() ); + return escapeBlob(s.c_str(), s.length()); } std::string DatabaseMySQL::escapeBlob(const char* s, uint32_t length) @@ -254,9 +254,9 @@ std::string DBResult::getDataString(const std::string &s) ListNames::iterator it = m_listNames.find(s); if(it != m_listNames.end() ) { if(m_row[it->second] == NULL) - return std::string(""); + return std::string(""); else - return std::string(m_row[it->second]); + return std::string(m_row[it->second]); } g_logger.error(stdext::format("error during getDataString(%s).", s)); diff --git a/src/framework/sql/mysql.h b/src/framework/sql/mysql.h index c72791dc..dfa32f6f 100644 --- a/src/framework/sql/mysql.h +++ b/src/framework/sql/mysql.h @@ -73,6 +73,7 @@ public: std::string getDataString(const std::string &s); bool next(); + int getRowCount() { return mysql_num_rows(m_res); } private: typedef std::map ListNames;