Demetris Zavorotnichenko wrote:
> SELECT SUBTIME('2007-12-31 23:59:59.999999','1 1:1:1.000002')
>
>
>
> So how would I get a result from this query ?
The MySQL manual says SUBTIME returns a value in the same form as the
first parameter, which looks like DATETIME:
http://dev.mysql.com/doc/refman/5.0/en/date-and-time-functions.html#function_subtime
> mysqlpp::SimpleResult res = query.execute();
No. SimpleResult is for queries that return no value, like INSERT,
CHANGE, DROP, ALTER....
I would use Query::store() for this:
StoreQueryResult res = query.store();
if (res) {
DateTime dt = res[0][0];
// do something with dt....
}
| Thread |
|---|
| • SUBTIME | Demetris Zavorotnichenko | 16 Oct |
| • Re: SUBTIME | Rick Gutleber | 16 Oct |
| • Re: SUBTIME | Warren Young | 17 Oct |