Sorry, thought you were talking about the test of the result object
rather than parameters to your logging function!
But, what I said is still valid as your problem is that "even if there's
no help data for the command the user requests help for, res_help_cmd
What you describe is the correct behaviour for mysql++. Sometimes it is
perfectly ok to have no results found, e.g. "get the customers who have
bought a certain product in the last week" - there might not be any, but
that is still the correct answer and should not throw an exception or be
treated as an error condition.
As there was no error with the query, a boolean test of res_help_cmd
will return true.
You should call num_rows to find out if there is data available and only
log if that is the case. Look at examples/simple1.cpp.
Alternatively, use for_each.
> Well, in a previous answer, Warren used that if-statement and it
> worked fine. As for those true/false: they're part of my slog.clog
> function and really doesn't have anything to do with SQL.