juk3n/fluffypublic Fork
⑂ 332fe67
Commits
⬇ Clone ▾
git clone https://git.rickub.com/juk3n/fluffy.git
git clone ssh://git@rickub.com/juk3n/fluffy.git

Host key fingerprint (ed25519): SHA256:iycHnxEyq0Q7uyVpB7JlznP0G7JrTPXLYRcAU5CSLhc — verify it before your first connect.

added remove function

Adrian Duraj committed 2024-06-16T21:35:22+02:00 Browse files
332fe67 parent: 9c36b11
modified src/main.cpp +6 -0
@@ -49,6 +49,12 @@ void addGame(sqlite3* database, int id, std::string name, std::string path) {
4949 execute_sql_command(database, command);
5050 }
5151
52+void removeGame(sqlite3* database, std::string name) {
53+ std::string command = "DELETE FROM GAME WHERE GAME_NAME=";
54+ command += "'" + name + "';";
55+ execute_sql_command(database, command);
56+}
57+
5258 void initialize_database(sqlite3* database) {
5359 execute_sql_command(database, database_initialization_command);
5460 addGame(database, 1, "Devastating Fog", "");
@@ -49,6 +49,12 @@ void addGame(sqlite3* database, int id, std::string name, std::string path) {
49 execute_sql_command(database, command);49 execute_sql_command(database, command);
50 }50 }
51 51
52+void removeGame(sqlite3* database, std::string name) {
53+ std::string command = "DELETE FROM GAME WHERE GAME_NAME=";
54+ command += "'" + name + "';";
55+ execute_sql_command(database, command);
56+}
57+
52 void initialize_database(sqlite3* database) {58 void initialize_database(sqlite3* database) {
53 execute_sql_command(database, database_initialization_command);59 execute_sql_command(database, database_initialization_command);
54 addGame(database, 1, "Devastating Fog", "");60 addGame(database, 1, "Devastating Fog", "");