List:MySQL++« Previous MessageNext Message »
From:Access-Dev Date:July 4 2011 10:54am
Subject:Re: exception in subqueries
View as plain text  
> "SELECT 1;" is not a sub-query.
> You don't need the semi-colon in your query, the API knows that the
> end of the string is the end of the query.
> To chain together multiple queries in a single string you can separate
> them with ';' and enable the mysqlpp::MultiStatementOption (see
> but for a single query just use "SELECT 1" instead of "SELECT 1;"
> The examples in the mysql++ source distribution are useful, you should
> review them and compare your failing code to the examples to find why
> they work and yours doesn't. See
Sorry, my message was not clear enough, by subquery I mean excetuing a 
query for each row



query = "SELECT * FROM table";

for each (row){

     subquery = "SELECT COUNT(*) FROM anothertable WHERE table_id= 


exception in subqueriesAccess-Dev4 Jul
  • Re: exception in subqueriesJonathan Wakely4 Jul
    • Re: exception in subqueriesAccess-Dev4 Jul
      • RE: exception in subqueriesShaun Brown4 Jul
        • Re: exception in subqueriesAccess-Dev4 Jul
          • Re: exception in subqueriesWarren Young5 Jul
      • Re: exception in subqueriesJonathan Wakely4 Jul