Compare commits
3 Commits
d3726df3e3
...
9fa9178e32
Author | SHA1 | Date | |
---|---|---|---|
|
9fa9178e32 | ||
|
4fd86cc606 | ||
|
745df5d48b |
Binary file not shown.
@ -43,6 +43,7 @@ map<string, vector<string>> sql3::query(const string sql_command) {
|
||||
}
|
||||
else {
|
||||
Answer = responseDatabase;
|
||||
responseDatabase.clear();
|
||||
}
|
||||
|
||||
if (!keepOpen) {
|
||||
@ -100,13 +101,11 @@ sql3::~sql3() {
|
||||
|
||||
static int callback(void* data, int argc, char** argv, char** azColName) {
|
||||
int i;
|
||||
fprintf(stderr, "%s: ", (const char*)data);
|
||||
// fprintf(stderr, "%s: ", (const char*)data); // ovo je ispisivalo čudne stringove toplo se nadam da nam ne treba
|
||||
char res[1000];
|
||||
responseDatabase.clear();
|
||||
for (i = 0; i < argc; i++) {
|
||||
sprintf(res, "%s = %s", azColName[i], argv[i] ? argv[i] : "NULL");
|
||||
responseDatabase += res;
|
||||
responseDatabase += '\n';
|
||||
responseDatabase += string(res) + string("\n");
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
@ -7,7 +7,7 @@ using namespace std;
|
||||
int main() {
|
||||
try {
|
||||
|
||||
sql3 mydb("../example/example_copy.db", false);
|
||||
sql3 mydb("../example/example.db", false);
|
||||
|
||||
// cout << mydb.ask("Select * from Tab1");
|
||||
// cout << mydb.ask("INSERT INTO Tab1 VALUES(3,'Pakora', 'marijanab@bitelex.ml');");
|
||||
|
BIN
test/test.o
BIN
test/test.o
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user