List:MySQL++« Previous MessageNext Message »
From:Warren Young Date:August 12 2008 8:48pm
Subject:Re: problem with fetch_row()
View as plain text  
On Aug 11, 2008, at 1:06 PM, jujulj wrote:

>        mysqlpp::Query query = conn.query("select fingerprint,
> count(*) from fingerprints group by fingerprint order by
> fingerprint;");

Does it work if you enable multiqueries (see examples/multiquery.cpp)  
and change the query to: "select count(*) from fingerprints; select  
fingerprint from fingerprints order by fingerprint" ?

> doing it using directly the C API works.

Can you post the code, so I can compare the way the two work?

> I'm going to use it instead, and do the count and sort in C++...

I understand letting the database engine do the sort, but I don't  
understand why it's useful to let it do the counting, unless you do it  
like I show above, where the count comes in ahead of the rows.  If the  
count comes in after, it doesn't tell you anything you don't already  
know.

Thread
problem with fetch_row()jujulj11 Aug
  • Re: problem with fetch_row()Warren Young11 Aug
    • Re: problem with fetch_row()jujulj12 Aug
    • Re: problem with fetch_row()jujulj12 Aug
    • Re: problem with fetch_row()jujulj12 Aug
  • Re: problem with fetch_row()Warren Young12 Aug