7 messages in com.mysql.lists.plusplusRe: Nested queries
FromSent OnAttachments
Mattias Fliesberg21 Oct 2005 03:34 
Jonatan Taminau21 Oct 2005 06:53 
Chris Frey21 Oct 2005 07:12 
Fabricio Mota22 Oct 2005 04:55 
Warren Young22 Oct 2005 21:50 
Mattias Fliesberg24 Oct 2005 02:14 
Chris Frey24 Oct 2005 03:50 
Subject:Re: Nested queries
From:Chris Frey (cdf@foursquare.net)
Date:10/24/2005 03:50:05 AM
List:com.mysql.lists.plusplus

You could use the query.store() call instead of query.use()... this returns a Result object instead of a ResUse, storing the results in memory all at once, just like PHP's mysql_query().

See the docs: http://tangentsoft.net/mysql++/doc/userman/html/overview.html#id2810307

- Chris

On Mon, Oct 24, 2005 at 11:14:59AM +0200, Mattias Fliesberg wrote:

Oh, of course it does. But how is it solved in PHP? I know you can do it there...

I've tried the seperate connection solution but it didn't work, guess I'll try it again.

//Mattias

On 10/23/05, Warren Young <mysq@etr-usa.com> wrote:

Mattias Fliesberg wrote:

I'm trying to execute a query, within another queries loop.

The MySQL C API that underlies MySQL++ imposes restrictions on that. RTFM. You must consume all rows from a SELECT before you can issue another query on the same connection.

To get around this, you can use separate Connection objects, and get a Query object from each one.