From: Warren Young Date: July 4 2011 11:03pm Subject: Re: exception in subqueries List-Archive: http://lists.mysql.com/plusplus/9385 Message-Id: <4E1246CA.60508@etr-usa.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit On 7/4/2011 7:40 AM, Access-Dev wrote: > SELECT SQL_CALC_FOUND_ROWS > custom_tracking35.id AS numTags [snip] > t.numTags = MPP_TO_ITF_STRING( row[ "numTags" ]); // numTags contains > incorrect value , have to be the number of rows , but colum id returned I confess to initially blanking out your SQL statement. I believe it was a form of psychological protection, my brain trying to protect itself. Risking the madness of Cthulu in giving it a second look, I saw the second line quoted above. Does this not say exactly what you are reporting? That is, are you not *asking* MySQL to give you the numTags column "AS" id? MySQL++, when you ask it to return a column from a row by its name, has to go on field names the database server returns. When you alias field names this way, it has no way of second guessing you. If the database server says the data in column X is called numTags, MySQL++ has to believe that.