View Single Post
Old 01-27-2009, 03:50 AM   #3 (permalink)
ttmtake
The Wanderer
 
Join Date: Jan 2009
Posts: 8
Thanks: 0
ttmtake is on a distinguished road
Default

Thank you, it is what iam looking.
With this code i can get first 2 names of most used countrys:

PHP Code:
$sql=mysql_query("SELECT
    country,
    COUNT(*) AS num_entries
FROM
    countrys
GROUP BY
    country
ORDER BY
    num_entries DESC LIMIT 2"
);
    
while (
$row mysql_fetch_array($sql)){
echo 
$row['country'];

Now, how can i get row number where 1 country is used and where 2 country is used. Like Europe = 3 rows
ttmtake is offline  
Reply With Quote