On Wednesday 22 May 2002 11:02, CrossWalkCentral wrote:
> OK when i pull data oout of the database i want to count the number of
> records where 3 field are the same.
>
> I have 6 fileds
> field1=my first name
> filed2=my last name
> filed3=my email
> filed4=other
> field5=other
> field5=other
>
> I want to count the records that have the same field1,field2, and field3.
>
> so i know how many submissions a person has made,

Try:

  SELECT count(*), 
         field1, 
         field2, 
         field3 
    FROM table 
GROUP BY field1, 
         field2, 
         field3;
-- 
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *


/*
Small is beautiful.
*/


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to