Miklos Niedermayer writes:
>
> Hi!
>
> Is this a bug, or feauture, or what?
>
> Result res = q.store ();
> Row row;
> Result::iterator i;
> i = res.begin ();
> row = *i;
> // un = row[0];
> q << "update staff_utmp set time=NOW() where user='" << row[0]
<< "'";
> q.execute ();
> un=row[0];
>
> So the above example is wrong, i had to move un=row[0] 3 lines up
> (commented), because if i do another query with q (like above),
> row will contain something else. I think it should not.
>
> I'll look into it more closer, i'm just finished searching for hours
> what the hell is the problem with my string library... yeah the problem
> was this.
>
> Bye
>
> Mico
Hi!
As explained in detail in MySQL++ manual, streaming with queries is
done for queries that return results.
For others, like UPDATE use exec() method.
Regards,
Sinisa
+----------------------------------------------------------------------+
| ____ __ _____ _____ ___ == MySQL AB |
| /*/\*\/\*\ /*/ \*\ /*/ \*\ |*| Sinisa Milivojevic |
| /*/ /*/ /*/ \*\_ |*| |*||*| mailto:sinisa@stripped |
| /*/ /*/ /*/\*\/*/ \*\|*| |*||*| Larnaka, Cyprus |
| /*/ /*/ /*/\*\_/*/ \*\_/*/ |*|____ |
| ^^^^^^^^^^^^/*/^^^^^^^^^^^\*\^^^^^^^^^^^ |
| /*/ \*\ Developers Team |
+----------------------------------------------------------------------+