Jump to content

[SOLVED] How to count same rows in one table?


beyzad

Recommended Posts

Hi guys.

 

I have a table named 'USER' with two fields `name` , `l_name`

 

Every one can write they name and last names in form and that will be inserted as a row.

 

How can i count each users rows?

 

For example:

 

John kain : 2 times

David potter : 1 times

Samuel haug : 13 times

 

Thanks

I have a table named 'USER' with two fields `name` , `l_name`

 

Every one can write they name and last names in form and that will be inserted as a row.

 

How can i count each users rows?

 

Would be easier to use one column for 1st and last names

 

As they are...

 

COUNT(*) FROM USER WHERE name = 'John' AND l_name = 'kain'

 

If you want it more dynamic youll have to join the columns first......simple

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.