Ah, yes, just tested it -- works perfect. Thanks. :)
2008/8/26 Joel Fielder <joel.fielder@stripped>:
> 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 returns
> 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.
> Alex wrote:
>> 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.
GamerzWoW - http://www.gamerzwow.net