diff options
author | Joursoir <chat@joursoir.net> | 2020-12-05 18:12:04 +0000 |
---|---|---|
committer | Joursoir <chat@joursoir.net> | 2020-12-05 18:12:04 +0000 |
commit | 91d777da4f5baeac47b3097913b2407b45bc031e (patch) | |
tree | 26c1edbbdb0b6998bb533a5862151f56e1fda025 /src/server/database.cpp | |
parent | 6f43ecd3758f445249db2bd4c4b32b912243cbdd (diff) | |
download | want-chat-91d777da4f5baeac47b3097913b2407b45bc031e.tar.gz want-chat-91d777da4f5baeac47b3097913b2407b45bc031e.tar.bz2 want-chat-91d777da4f5baeac47b3097913b2407b45bc031e.zip |
add registration and authorization
Diffstat (limited to 'src/server/database.cpp')
-rw-r--r-- | src/server/database.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
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 |