tags:

views:

245

answers:

1

Hi,

I'm trying to get the total count for a query but MYSQL and PHP return different values.

Query:

SELECT count(*) as fr FROM (select uemail from associado WHERE utipo=1) AS t1

MYSQL returns 11; PHP returns 10;

Is there any reason for that?

I've found the following:

The missing row is:

"[email protected]";

This row is just after:

"[email protected]"

does it makes any sense?

Edit:

In php im using regular mysql_fetch_assoc returning the count['fr'] field.

And testing also on the mysql query browser directly.

Edit2:

Ok i've tested the same query for other values (uativo=2) and it returns the CORRECT VALUE.

So, The problem seems to be related with the two entries above.

+1  A: 

How did you test it? Which codes leads to different values?

Savageman