SQLite: Difference between revisions

Jump to navigation Jump to search
Line 73: Line 73:
   }
   }


   query = "INSERT INTO employee(name,age) VALUES(John Smith," + std::to_string(age) + ");";
   query = "INSERT INTO employee(name,age) VALUES(\"John Smith\"," + std::to_string(age) + ");";
   ierr = sqlite3_exec(dbase,query.c_str(),nullptr,nullptr,nullptr);
   ierr = sqlite3_exec(dbase,query.c_str(),nullptr,nullptr,nullptr);
   if (ierr != SQLITE_OK) {
   if (ierr != SQLITE_OK) {
Bureaucrats, cc_docs_admin, cc_staff
2,318

edits

Navigation menu