Ist es möglich für "Nextwars" bereits die Anzahl eingetragener Member auf der Startseite anzeigen zu lassen? Wenn ja, wie?
Zuletzt modifiziert von Bolli am 29.04.2006 - 11:26:43
Hier kann eine Notiz zum Merk-Eintrag hinzugefügt werden (optional)
Geschlossen |
SELECT COUNT(uid) FROM prefix_warmember WHERE wid = 1 AND aktion = 1
<?php defined ('main') or die ( 'no direct access' ); echo '<table width="100%" border="0" cellpadding="2" cellspacing="0">'; $akttime = date('Y-m-d'); $erg = @db_query("SELECT DATE_FORMAT(datime,'%d.%m.%y - %H:%i') as time,tag,gegner, id, game FROM prefix_wars WHERE status = 2 AND datime > '".$akttime."' ORDER BY datime"); if ( @db_num_rows($erg) == 0 ) { echo '<tr><td>kein War geplant</td></tr>'; } else { while ($row = @db_fetch_object($erg) ) { $row->tag = ( empty($row->tag) ? $row->gegner : $row->tag ); echo '<tr><td>'.get_wargameimg($row->game).'</td>'; echo '<td><a class="box" href="index.php?wars-more-'.$row->id.'">'; echo $row->time.' - '.$row->tag.'</a></td></tr>'; } } echo '</table>'; ?>
<?php defined ('main') or die ( 'no direct access' ); echo '<table width="100%" border="0" cellpadding="2" cellspacing="0">'; $akttime = date('Y-m-d'); $erg = @db_query("SELECT DATE_FORMAT(datime,'%d.%m.%y - %H:%i') as time,tag,mod,gegner, id, game FROM prefix_wars WHERE status = 2 AND datime > '".$akttime."' ORDER BY datime"); if ( @db_num_rows($erg) == 0 ) { echo '<tr><td>kein War geplant</td></tr>'; } else { while ($row = @db_fetch_object($erg) ) { $row->tag = ( empty($row->tag) ? $row->gegner : $row->tag ); $mod = explode('on',$row-mod); $result = db_query("SELECT COUNT(uid) FROM prefix_warmember WHERE wid = ".$row->id." AND aktion = 1") ; $row2 = mysql_fetch_assoc($result); echo '<tr><td>'.get_wargameimg($row->game).'</td>'; echo '<td><a class="box" href="index.php?wars-more-'.$row->id.'">'; echo $row->time.' - '.$row->tag.'</a></td><td>Es haben sich'.$mod['0'].' von '.$row2->uid.' angemeldet</td></tr>'; } } echo '</table>'; ?>
<?php defined ('main') or die ( 'no direct access' ); echo '<table width="100%" border="0" cellpadding="2" cellspacing="0">'; $akttime = date('Y-m-d'); $erg = @db_query("SELECT DATE_FORMAT(datime,'%d.%m.%y - %H:%i') as time,tag,mod,gegner, id, game FROM prefix_wars WHERE status = 2 AND datime > '".$akttime."' ORDER BY datime"); if ( @db_num_rows($erg) == 0 ) { echo '<tr><td>kein War geplant</td></tr>'; } else { while ($row = @db_fetch_object($erg) ) { $row->tag = ( empty($row->tag) ? $row->gegner : $row->tag ); $mod = explode('on',$row->mod); $result = db_query("SELECT COUNT(uid) FROM prefix_warmember WHERE wid = ".$row->id." AND aktion = 1") ; $row2 = mysql_fetch_assoc($result); echo '<tr><td>'.get_wargameimg($row->game).'</td>'; echo '<td><a class="box" href="index.php?wars-more-'.$row->id.'">'; echo $row->time.' - '.$row->tag.'</a></td><td>Es haben sich'.$mod['0'].' von '.$row2->uid.' angemeldet</td></tr>'; } } echo '</table>'; ?>
<?php defined ('main') or die ( 'no direct access' ); echo '<table width="100%" border="0" cellpadding="2" cellspacing="0">'; $akttime = date('Y-m-d'); $erg = @db_query("SELECT DATE_FORMAT(datime,'%d.%m.%y - %H:%i') as time,tag,mod,gegner, id, game FROM prefix_wars WHERE status = 2 AND datime > '".$akttime."' ORDER BY datime"); if ( @db_num_rows($erg) == 0 ) { echo '<tr><td>kein War geplant</td></tr>'; } else { while ($row = @db_fetch_object($erg) ) { $mod = ''; $row->tag = ( empty($row->tag) ? $row->gegner : $row->tag ); $mod = explode('on',$row->mod); $result = db_query("SELECT COUNT(uid) FROM prefix_warmember WHERE wid = ".$row->id." AND aktion = 1") ; $row2 = mysql_fetch_assoc($result); echo '<tr><td>'.get_wargameimg($row->game).'</td>'; echo '<td><a class="box" href="index.php?wars-more-'.$row->id.'">'; echo $row->time.' - '.$row->tag.'</a></td><td>Es haben sich'.$mod['0'].' von '.$row2->uid.' angemeldet</td></tr>'; } } echo '</table>'; ?>
<?php defined ('main') or die ( 'no direct access' ); echo '<table width="100%" border="0" cellpadding="2" cellspacing="0">'; $akttime = date('Y-m-d'); $erg = @db_query("SELECT DATE_FORMAT(datime,'%d.%m.%y - %H:%i') as time,tag,mod,gegner, id, game FROM prefix_wars WHERE status = 2 AND datime > '".$akttime."' ORDER BY datime"); if ( @db_num_rows($erg) == 0 ) { echo '<tr><td>kein War geplant</td></tr>'; } else { while ($row = @db_fetch_object($erg) ) { $mod = ''; $row2['reg']=''; $hat = 'haben'; $row->tag = ( empty($row->tag) ? $row->gegner : $row->tag ); $mod = explode('on',$row->mod); $result = db_query("SELECT COUNT(*)as reg FROM prefix_warmember WHERE wid = ".$row->id." AND aktion = 1") ; $row2 = db_fetch_assoc($result); if($row2['reg']<=1){$hat = 'hat';} echo '<tr><td>'.get_wargameimg($row->game).'</td></tr><tr>'; echo '<td><a class="box" href="index.php?wars-more-'.$row->id.'">'; echo $row->time.' - '.$row->tag.'</a></td></tr><tr><td>Es '.$hat.' sich '.$row2['reg'].' von '.$mod['0'].' angemeldet</td></tr>'; } } echo '</table>'; ?>
$erg = @db_query("SELECT DATE_FORMAT(datime,'%d.%m.%y - %H:%i') as time,tag,mod,gegner, id, game FROM prefix_wars WHERE status = 2 ORDER BY datime,id DESC LIMIT 3");
Geschlossen | ||
Zurück zu Kritik und Verbesserungen |