PHP beginner |
|
Ik heb onderstaande code:
$browser = @mysql_query("SELECT count(*) AS aantal, browser FROM cms_stats GROUP BY browser ORDER BY browser DESC")or die(mysql_error());
while ($br = @mysql_fetch_assoc($browser))
{
echo "$browser = aantal per rij: $aantal";
}
$browser = @mysql_query("SELECT count(*) AS aantal, browser FROM cms_stats GROUP BY browser ORDER BY browser DESC")or die(mysql_error()); { echo "$browser = aantal per rij: $aantal"; }
hoe kan ik het aantal laten zien? nu blijft de pagina laden
als ik dit in phpmyadmin uitvoer:
SELECT count(*) AS aantal, browser FROM cms_stats GROUP BY browser ORDER BY browser DESC
SELECT count(*) AS aantal, browser FROM cms_stats GROUP BY browser ORDER BY browser DESC
krijg ik 2 kolommen:
count(*) | browser
12 | internet 6
1 | internet 7
etc...
dat onder count(*) wil ik graag op de site weergeven
bedankt
|