List:MySQL++« Previous MessageNext Message »
From:Kim Rasmussen Date:September 28 2005 11:21am
Subject:Error in User Manual?
View as plain text  
Hi!

I'm pretty new to MySql++ so please forgive me if I've overlooked 
something. Here's my problem.

In Section 2.3, "Queries That Return Data: Dynamic Method" of the User 
Manual (as on 
http://tangentsoft.net/mysql++/doc/userman/html/overview.html) the 
following is stated:

>  The easiest way to retrieve data from MySQL uses a Result object,
>  which includes one or more Row objects. Because these classes are
>  std::vector-like containers, you can treat the result set as a
>  two-dimensional array. For example, you can get the 5th item on the
>  2nd row by simply saying result[1][4]. You can also access row
>  elements by field name, like this: result[2].lookup_by_name("price").

But as far as I can tell the Result object doesn't even supply an 
operator[] and if I try to use the "result[][]" notation I get a compile 
error ("error: no match for 'operator[]' in 'result[0]').

So, what's the right way? Should I do "result.at(0)[0]" instead?

I'm using MySql++ 2.0.5.

Thanks.

    -Kim



Thread
Error in User Manual?Kim Rasmussen28 Sep
  • Re: Error in User Manual?Warren Young28 Sep
    • Re: Error in User Manual?Kim Rasmussen28 Sep
      • Re: Error in User Manual?Bernd Prager30 Sep