php and mysql Count(*)
Posted: Sun Jan 23, 2005 10:40 pm
Ok I have this, lets say i have a sql table about articles that users send... i want a code to count the articles that each user send and return the username and the number of articles each user has send...
the result would be something like:
Users # Articles
1. Username1 - 23
2. Username2 - 21
3. Username3 - 17
4. Username4 - 10
i know has to do something with the COUNT(*) function of mysql but i had no luck
or maybe i am worng...
thanks
the result would be something like:
Users # Articles
1. Username1 - 23
2. Username2 - 21
3. Username3 - 17
4. Username4 - 10
i know has to do something with the COUNT(*) function of mysql but i had no luck
or maybe i am worng...
thanks