From 91d777da4f5baeac47b3097913b2407b45bc031e Mon Sep 17 00:00:00 2001 From: Joursoir Date: Sat, 5 Dec 2020 18:12:04 +0000 Subject: add registration and authorization --- src/server/database.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/server/database.cpp') diff --git a/src/server/database.cpp b/src/server/database.cpp index 4438cc2..dcec5a6 100644 --- a/src/server/database.cpp +++ b/src/server/database.cpp @@ -16,6 +16,9 @@ char *DB_ROW::operator[](const int index) AnswerDB::~AnswerDB() { + if(current_row) + delete current_row; + mysql_free_result(result); } @@ -68,4 +71,9 @@ AnswerDB *DatabaseManager::QuerySelect(const char *sql) unsigned int fields = mysql_num_fields(result); unsigned long rows = mysql_num_rows(result); return new AnswerDB(result, fields, rows); +} + +int DatabaseManager::QueryInsert(const char *sql) +{ + return mysql_query(connection, sql); } \ No newline at end of file -- cgit v1.2.3-18-g5258