List:MySQL++« Previous MessageNext Message »
From:Nicolas Barrera Date:April 25 2005 2:45pm
Subject:Count( ) function
View as plain text  
hi i m having the following problem...
i 'm starting a query with the count(*) function....
like: select aFieldName, count(*) as cant ........  ;

the thing is that i m doing a type check when i got the Result object...

with, result.types(j).base_type() == typeid(std::string) 
and with resultado.types(j).base_type() == typeid(int)

both are arguments of two separated if statements...
my problem is that ONLY WHEN executing the query with the COUNT function... 
i DO GET the value BUT it does NOT enter to neither of both if statements... 

which type is the value returned in the cant alias?? (or better to
say.. by the count(*) function?)

i hope you can give me a hint on this... i need to validate that types
so i m stucked there...
cheers and thanks in advance
Thread
Count( ) functionNicolas Barrera25 Apr
  • Re: Count( ) functionChris Frey25 Apr
Re: Count( ) functionChris Frey3 May
  • Re: Count( ) functionNicolas Barrera3 May
    • Re: Count( ) functionEarl Miles3 May
      • Re: Count( ) functionNicolas Barrera3 May
        • Re: Count( ) functionWarren Young4 May