Hi,
i just want to find out total no. of records in a table which is having same information in some fields of table mean matching information in the fields. i can elaborate it as suppose i have a survey table which is having 4 answers fields and there are thousands of records in that table, i want to know how many people have given same answers.
Please help me to write db query.
Thanks
How to find total no. of records in a table having same info
Moderator: General Moderators
- jaoudestudios
- DevNet Resident
- Posts: 1483
- Joined: Wed Jun 18, 2008 8:32 am
- Location: Surrey
Re: How to find total no. of records in a table having same info
What do you have so far?
You will need something like this...
You will need something like this...
Code: Select all
$q = "SELECT COUNT(id) AS total FROM *table* WHERE q1 = '".$a1."' AND ....";