How Many?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
NeoPuma
Forum Commoner
Posts: 26
Joined: Sat Mar 06, 2004 12:18 pm
Location: South Wales, UK
Contact:

How Many?

Post by NeoPuma »

Hi,
How do I find how many things are in a certain colum.
e.g: How many H's are in colum Letter (in the MySQL).

Thanks
-Neo
microthick
Forum Regular
Posts: 543
Joined: Wed Sep 24, 2003 2:15 pm
Location: Vancouver, BC

Post by microthick »

You can use the MySQL COUNT() function.

So, to find out how many H's you have in the column Letter, you can go:
SELECT COUNT(*) As letterKount FROM Letter WHERE theLetter = 'H'
Post Reply