$count problem

Bansi+

Mitglied
hi
ich möchte gerne für mein clanwar script
die gewonnen und verlorenen clanwars zählen aber ich weiss nicht wie ich das anstellen soll :(

für gesamt das hab ich hin bekommen

PHP:
<? $result_wars_gesamt = mysql_query("SELECT id FROM sth_wars "); ?>
<? $count = mysql_num_rows($result_wars_gesamt); print $count; ?>

in der tabelle steht dann
Win, Lose, Draw

aber wie ich die wins zähle keine ahnung

bsp:

Code:
id gesamt url mod time opponent map1 map2 result shorthandle   
47 win  www.sthcrew.de  5on5  1015801200 [-ng-]  dod_caen  dod_ramelle  586 - 489  [-ng-]

danke für eure hilfe :)
 
So hab ich das jetzt

PHP:
[ Gesamt: 
<? $result_wars_gesamt = mysql_query("SELECT id FROM sth_wars "); ?>
<? $count = mysql_num_rows($result_wars_gesamt); print $count; ?>
 | Won: 
<? $result_wars_won = mysql_query("SELECT id FROM sth_wars gesamt = '$win'"); ?>
<? $count = mysql_num_rows($result_wars_won); print $count; ?>

aber das geht nicht da kommt ein fehler :(

Code:
[ Gesamt: 75 | Won: 
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/www/s19p1222/html/matches.php on line 20
 
Zuletzt bearbeitet:

Neue Beiträge

Zurück