I want to Count the duplicate rows and print the result in php.
This is my query:
$q1 = mysql_query("SELECT COUNT(*) as cnt
FROM sur_ques
WHERE sur_id = '$chek'");
echo $q1;
But instead of the actual result I am getting the following out put:
Resource Id #4
What’s wrong in this query?
you have to rewrite
$q1 = mysql_query(“select count(*) as cnt from sur_ques where sur_id = ‘$chek'”); echo $q1;
as
This will help you!
Cheers!