26 |
#include "lscpevent.h" |
#include "lscpevent.h" |
27 |
//#include "../common/global.h" |
//#include "../common/global.h" |
28 |
|
|
29 |
#ifdef HAVE_SQLITE3 |
#if HAVE_SQLITE3 |
30 |
#include "sqlite3.h" |
# include "sqlite3.h" |
31 |
#endif |
#endif |
32 |
|
|
33 |
#include "../engines/gig/Engine.h" |
#include "../engines/gig/Engine.h" |
1408 |
|
|
1409 |
String LSCPServer::QueryDatabase(String query) { |
String LSCPServer::QueryDatabase(String query) { |
1410 |
LSCPResultSet result; |
LSCPResultSet result; |
1411 |
#ifdef HAVE_SQLITE3 |
#if HAVE_SQLITE3 |
1412 |
char* zErrMsg = NULL; |
char* zErrMsg = NULL; |
1413 |
sqlite3 *db; |
sqlite3 *db; |
1414 |
String selectStr = "SELECT " + query; |
String selectStr = "SELECT " + query; |
1420 |
} |
} |
1421 |
if ( rc != SQLITE_OK ) |
if ( rc != SQLITE_OK ) |
1422 |
{ |
{ |
1423 |
//result.Error(String(zErrMsg), rc); |
result.Error(String(zErrMsg), rc); |
|
result.Error(selectStr, 666); |
|
1424 |
} |
} |
1425 |
sqlite3_close(db); |
sqlite3_close(db); |
1426 |
#else |
#else |