|
|
@ -43,6 +43,7 @@ bool sql3::run(const string sql_command) { |
|
|
|
} |
|
|
|
} |
|
|
|
else { |
|
|
|
else { |
|
|
|
Answer = responseDatabase; |
|
|
|
Answer = responseDatabase; |
|
|
|
|
|
|
|
responseDatabase.clear(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (!keepOpen) { |
|
|
|
if (!keepOpen) { |
|
|
@ -115,13 +116,11 @@ sql3::~sql3() { |
|
|
|
|
|
|
|
|
|
|
|
static int callback(void* data, int argc, char** argv, char** azColName) { |
|
|
|
static int callback(void* data, int argc, char** argv, char** azColName) { |
|
|
|
int i; |
|
|
|
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]; |
|
|
|
char res[1000]; |
|
|
|
responseDatabase.clear(); |
|
|
|
|
|
|
|
for (i = 0; i < argc; i++) { |
|
|
|
for (i = 0; i < argc; i++) { |
|
|
|
sprintf(res, "%s = %s", azColName[i], argv[i] ? argv[i] : "NULL"); |
|
|
|
sprintf(res, "%s = %s", azColName[i], argv[i] ? argv[i] : "NULL"); |
|
|
|
responseDatabase += res; |
|
|
|
responseDatabase += string(res) + string("\n"); |
|
|
|
responseDatabase += '\n'; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
return 0; |
|
|
|
return 0; |
|
|
|
} |
|
|
|
} |
|
|
|