Fix when no have params

dev
marcelb 2 weeks ago
parent 057649448c
commit 8f19567a59
  1. 2
      lib/sqlite3.hpp
  2. 2
      test/test.cpp

@ -37,7 +37,7 @@ public:
* 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

@ -9,7 +9,7 @@ int main() {
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["MAIL"][1];

Loading…
Cancel
Save