ich glaubs net. ich bin soooooo dooooof.
cano du bist mein gott. danke danke
ich könnt mir mal wieder kräftig in den arsch beißen:
Code:
<?php
$table_ids = mysql_query("select distinct user_id from ite_ex_visits;", $db);
$anzahl = 0;
while($anzahl < mysql_num_rows($table_ids))
{
$daten_id = mysql_fetch_array($table_ids, MYSQL_ASSOC);
$id{$anzahl} = (int)$daten_id[user_id]; //beim ersten durchlauf tuts dann nemme
$anzahl++;
}
$anzahl = 0;
while($anzahl < count($id))
{
$table_zahl = mysql_query("select count(*) as zahl from ite_ex_visits where user_id = \"".$id{$anzahl}."\";", $db);
$daten_zahl = mysql_fetch_array($table_zahl, MYSQL_ASSOC);
$table_name = mysql_query("select name from ite_users where id = \"".$id{$anzahl}."\";", $db);
$daten_name = mysql_fetch_array($table_name, MYSQL_ASSOC);
$stat[$anzahl][0] = $daten_name[name];
$stat[$anzahl][1] = $daten_zahl[zahl];
$anzahl++;
echo $stat[$anzahl][0]."(".$stat[$anzahl][1].")<br>";
}//ok $stat[...][0] = name des typs und $stat[...][1] = wieviele exs er gemacht hat, nur noch sortieren
/*
$anzahl = -1;
$zahl = 0;
while(count($stat) != 0)
{
$anzahl++;
if($anzahl > count($stat))
{
$anzahl = 0;
}
if(isset($stat[$anzahl]) && !(isset($max)))
{
$max = $stat[$anzahl];
}
else
{
break;
}
$i = 0;
while($i < count($stat))
{
if($max < $stat[$i][1])
{
unset($max);
}
$i++;
if($i == count($stat))
{
$statistics[$zahl] = $max;
unset($max);
}
}
}
$anzahl = 0;
while($anzahl > count($statistics))
{
echo $statistics[$anzahl]."<br>";
}
*/
?>
nix gut das da
vielleicht sollte ich mal gscheit mysql lernen
<edit>und ich könnt mir noch viel mehr in den arsch beißen wenn ich sehe dass ich immernoch zu blöd bin das syntaxs highlighting zu nutzen</edit>
[rot]//Kann ich auch nicht - Dann eben code - Tags
[/rot]