spalte aus mysql tabelle lesen und zählen

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • spalte aus mysql tabelle lesen und zählen

    hi
    weiss jemand wie ich zbsp. aus der tabelle cw die spalte wonLost lesen und alle "won" zählen kann ????
    für wallpaper: blumenbeet.com

  • #2
    select count(*) as anzahl from cw where wonLost ='won'

    php-Entwicklung | ebiz-consult.de
    PHP-Webhosting für PHP Entwickler | ebiz-webhosting.de
    die PHP Marktplatz-Software | ebiz-trader.de

    Comment


    • #3
      hi leuet bin neu hier...
      Da hab ich ja mal das richtige Thema gefunden
      So was such ich auch die ganze Zeit...

      Kann mir aber jemand kurz einen php quellcode hier rein screiben, wo ich das select count hinsetzen mus und iwe ich das ergebnis dann als variable $zahl ausgeben kann ??!

      Würdet mir echt helfen THX im Vorraus !

      DeathCraze

      Comment


      • #4
        tabelle: clanwars
        spalte: WonLost


        <?php
        // zählt won einträge
        $zahlwon = "SELECT * FROM clanwars WHERE WonLost = 'won'";
        $resultwon = mySQL_query($zahlwon, $conn);
        $rowwon = mySQL_num_rows($resultwon);
        echo "$rowwon";
        ?>

        zählt alle won einträge !!!!

        also bei mir funktionirt es...

        gruss blume
        für wallpaper: blumenbeet.com

        Comment

        Working...
        X