Tomas Fischer wrote:
> How can I get the result of following query?
> query << "SELECT MIN(EURO) from stock"
> res= query.store()
> row= *res.begin()
> row["EURO"] or row doesn' work...
I assume you're using MySQL++ 2.
To retrieve the value by position, use row.at(0). In row, the 0 is taken as
a NULL char*. (I'm sure Warren does know this.)
To retrieve it by name you could try row["MIN(EURO)"]. If that doesn't work,
set an alias in the query and ask for that. That is, "select min(euro) as
some_name from stock" and then row["some_name"].