[PHP-DB] counting a value

2004-01-30 Thread js
i want to know what i can use to count the number of times a value appears in a column listing where different values are listed. for example, say in the column of Favorite Number we have 100 students, and for each student his or her own row. and each student can pick a number from 1-10. So, we

Re: [PHP-DB] counting a value

2004-01-30 Thread Christian E. Berlioz
! - Original Message - From: js [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, January 30, 2004 12:07 PM Subject: [PHP-DB] counting a value i want to know what i can use to count the number of times a value appears in a column listing where different values are listed. for example, say

Re: [PHP-DB] counting a value

2004-01-30 Thread Robby Russell
js typed this on 01/30/2004 10:07 AM: i want to know what i can use to count the number of times a value appears in a column listing where different values are listed. for example, say in the column of Favorite Number we have 100 students, and for each student his or her own row. and each student

Re: [PHP-DB] counting a value

2004-01-30 Thread Ignatius Reilly
SELECT favourite_nb, COUNT(*) AS tally FROM mytable GROUP BY favourite_nb HTH Ignatius _ - Original Message - From: js [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, January 30, 2004 19:07 Subject: [PHP-DB] counting a value i want to know what i can use

[PHP-DB] counting a value REVISED pt2

2004-01-30 Thread js
p.s.- im using PHP with MySQL... if that helps any. thanks i want to know what i can use to count the number of times a value appears in a column listing where different values are listed. for example, say in the column of Favorite Number we have 100 students, and for each student his or her own

Re: [PHP-DB] counting a value REVISED pt2

2004-01-30 Thread Micah Stevens
select count(FavNum) as Favorite where FavNum = 2; On Fri January 30 2004 8:19 pm, js wrote: p.s.- im using PHP with MySQL... if that helps any. thanks i want to know what i can use to count the number of times a value appears in a column listing where different values are listed. for

Re: [PHP-DB] counting a value REVISED pt2

2004-01-30 Thread Robby Russell
js wrote: p.s.- im using PHP with MySQL... if that helps any. thanks i want to know what i can use to count the number of times a value appears in a column listing where different values are listed. for example, say in the column of Favorite Number we have 100 students, and for each student his