Q:

php mysql result coming back wrong, every time from php, but is fine in sql pro and phpmyadmin

The following statement is returning a 1 in php. I've serialized and output the result and every other credential, and it is doing this on three seperate queries. When I run the query in sqlpro or phpmyadmin I get the result as 8. Please tell me someone has a bright idea.
$numRFPsSwitch = 0;
$bquery = " SELECT COUNT(rp.id) AS 'NumRFPs'

   FROM  rfp_proposal rp

   WHERE rp.vendor_id = 1 AND rp.id IN(13,15,16,23,24,26,4,9) ";

$bresult = mysql_query($bquery, $connection); 
$XMLFormatedString .= 'NumRFPs="'; 
while ($brow = mysql_fetch_object($bresult)){ 

$XMLFormatedString .= $brow->NumRFPs; 
$numRFPsSwitch = 1; 
} 

A:

Perhaps you could do a SELECT * (to return all rows involved), and then do a mysql_num_rows(...) on the result to find out the row count. If this returns the same result, then at least you can be sure it's not the query or concatenation that's at fault.
$query = "SELECT ...";
echo mysql_num_rows(mysql_query($query, $connection));

