In my query example the id is not a primary key.So each id may appear n number of times (n records).So count of id will give you the total number of records corresponding to the id.Let us take the following example.
id->10(has 5 records)
id->20(has 10 records)
id->50(has 2 records)
select count(id) from table1;
-- will give total of 17 records.
select distinct id from table1;
-- will list only the 3 id's.
Suppose if i give
select count(distinct id) from table1
it will give the total distinct records as 3.
But in mysql 3.22.32 the above statement is not supported.But in 3.23.x it is working.
I can also get the above result using mysql_num_rows after the select statement.
The basic reason for my upgradation is this 3.22.32 has lot of bugs.I read thru the documents in mysql.com.So in this 3.23.x latest release they have fixed it.
Thanks .
srini