Count the number of specific rows
- Date: Fri, 29 Dec 2006 17:32:23 +0330
- From: "Servers24 Network" <servers24@xxxxxxxxx>
- Subject: Count the number of specific rows
Hi,
Well this question may seem funny, but I really need to know!
The problem is with counting a user's contribution in my site. Suppose that
each user that send an email will be stored in DB. Now I want to count
number of times that a user has sent an email.
I can simply use this :
SELECT id FROM sent WHERE member_id= ...
and the use count($result) to count the number, but I want a faster way, if
possible.
Thanks
PS : This is *MySQL 4.0.x*
--
Warm Regards,
Amir Mirghassemi