Fix when no have params

This commit is contained in:
marcelb 2024-10-31 17:55:11 +01:00
parent 057649448c
commit 8f19567a59
2 changed files with 2 additions and 2 deletions

View File

@ -37,7 +37,7 @@ public:
* Make a request to the database * Make a request to the database
*/ */
map<string, vector<string>> query(const string& sql_command, const vector<string>& values); map<string, vector<string>> query(const string& sql_command, const vector<string>& values = {});
/** /**
* Close the database and destroy the object * Close the database and destroy the object

View File

@ -9,7 +9,7 @@ int main() {
SQLite3 mydb("../example/example.db", false); SQLite3 mydb("../example/example.db", false);
auto res = mydb.query("Select * from Tab1 Where id > ?", {"3"}); auto res = mydb.query("Select * from Tab1");
// cout << endl << res["NAME"][1]; // cout << endl << res["NAME"][1];
// cout << endl << res["MAIL"][1]; // cout << endl << res["MAIL"][1];