summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/modules/extra/m_testclient.cpp24
1 files changed, 16 insertions, 8 deletions
diff --git a/src/modules/extra/m_testclient.cpp b/src/modules/extra/m_testclient.cpp
index 069c21c0b..a776fc490 100644
--- a/src/modules/extra/m_testclient.cpp
+++ b/src/modules/extra/m_testclient.cpp
@@ -55,18 +55,26 @@ public:
log(DEBUG, "Got SQL result (%s)", request->GetData());
SQLresult* res = (SQLresult*)request;
-
- log(DEBUG, "Got result with %d rows and %d columns", res->Rows(), res->Cols());
-
- for (int r = 0; r < res->Rows(); r++)
+
+ if (res->error.Id() != NO_ERROR)
{
- log(DEBUG, "Row %d:", r);
-
- for(int i = 0; i < res->Cols(); i++)
+ log(DEBUG, "Got result with %d rows and %d columns", res->Rows(), res->Cols());
+
+ for (int r = 0; r < res->Rows(); r++)
{
- log(DEBUG, "\t[%s]: %s", res->ColName(i).c_str(), res->GetValue(r, i).d.c_str());
+ log(DEBUG, "Row %d:", r);
+
+ for(int i = 0; i < res->Cols(); i++)
+ {
+ log(DEBUG, "\t[%s]: %s", res->ColName(i).c_str(), res->GetValue(r, i).d.c_str());
+ }
}
}
+ else
+ {
+ log(DEBUG, "SQLrequest failed: %s", res->error.Str());
+
+ }
return SQLSUCCESS;
}