Re: Count the number of specific rows

2006-12-29 Thread Philip Mather
Servers24, Hi Philip, Thank you very much for your help. Can you please tell me the differemce between COUNT(*) and COUNT(id) ? Thanks again. Actually sorry I was a bit misleading there. MySQL is optimized to calculate... SELECT COUNT(*) FROM aTable; ...but given the fact you've got a whe

Re: Count the number of specific rows

2006-12-29 Thread Peter Brawley
>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. SELECT COUNT(id) FROM sent WHERE member_id= ... PB Servers24 Network wrote: Hi, Well this question may seem funny, but I really need to

Re: Count the number of specific rows

2006-12-29 Thread Philip Mather
Servers24, Well this question may seem funny... No, a funny question would start something like "Why did the nun cross the road?". ;^) 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

Re: Count the number of specific rows

2006-12-29 Thread Duncan Hill
On Friday 29 December 2006 14:02, Servers24 Network wrote: > 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