SitePoint Sponsor |
|
User Tag List
Results 1 to 2 of 2
Threaded View
-
Nov 11, 2000, 18:36 #1
- Join Date
- Nov 2000
- Posts
- 9
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
I read 3 tutorials and coulnt find this anywhere
How would I turn this SQL command into PHP?
SELECT Author, COUNT(*) AS NumArticles FROM Count GROUP BY Author
I think it is something like
while (mysql_fetch_array(mysql_query("SELECT Author, COUNT(*) AS NumArticles FROM Count GROUP BY Author")))
{
$author=$row["Author"];
$numarticles=$row["NumArticles"];
echo ("$author - $numarticles");
}
But that doesnt work
I want it to count all the articles posted by each author
Thanks in advance
Nate Gross
DarkOps.com
Bookmarks