2 messages in com.mysql.lists.plusplusselect count(*) in mysql++
FromSent OnAttachments
libochen25 Apr 2001 01:23 
Eugene! Sizikoff25 Apr 2001 01:51 
Subject:select count(*) in mysql++
From:libochen (libo@netbow.de)
Date:04/25/2001 01:23:26 AM
List:com.mysql.lists.plusplus

Hi,

I wonder how mysql++ does with those sql statements that do not return rows but some other values. For example: 1. "select count(*) from table" returns back a integer. How can I use mysql++ to get the result? I know that I can use the num_row() function of resultset to catch the number of rows, but it is not so general. There are still other sql statements that return values other than rows like example 2. 2. "select GET_LOCK("lock1",10)" returns 1 if you get the lock, returns 0 if you can not get the lock. How can I get the result value by using mysql++?

Is there something like that?: query<<"select GET_LOCK('lock1',10)"; int lock_success =query.execute();

Thanks for the help

Chen

p.s. Is there a way to browse or search in mysql++ mailinglist? I'm not sure if someone else already asked the same question.