Spalte Addieren

Diese Seite verwendet Cookies. Durch die Nutzung unserer Seite erklären Sie sich damit einverstanden, dass wir Cookies setzen. Weitere Informationen

  • Spalte Addieren

    so hab mal ne frage ich habe folgende ausgabe geschrieben mir fehlt noch was ich möchte da unten wo gesamt steht die marktwerte adieren lassen weis nur nicht wie ich das mache ngl-fifa.de/include.php?path=test hier damit ihr wisst was ich meine

    mein Code:

    Quellcode

    1. <?php
    2. if(!defined('pkFRONTEND') || pkFRONTEND!='public')
    3. die('Direct access to this location is not permitted.');
    4. if(!getrights('user'))
    5. {
    6. pkEvent('access_refused');
    7. return;
    8. }
    9. $sname = pkgetconfig('site_name');
    10. $query = "SELECT _spi,_nr,_pos,_st,_ver,_mkw,_bem FROM ".phpkit_spieler." WHERE _ver LIKE 'SV Werder Bremen' ORDER BY _nr ";
    11. $test = $SQL->query($query);
    12. while ($row = $SQL->fetch_array($test)){
    13. eval("\$lm10_row.=\"".pkTpl("lm10_row")."\";");
    14. }
    15. echo'<table class="heads" align="center" width="100%" cellspacing="0" cellpadding="4">
    16. <tr>
    17. <th class="heads" width="20%" nowrap="nowrap" align="left">Spieler</th>
    18. <th class="heads" width="5%" nowrap="nowrap" align="left">Position</th>
    19. <th class="heads" width="5%" nowrap="nowrap" align="left">Stärke</th>
    20. <th class="heads" width="25%" nowrap="nowrap" align="left">Verein</th>
    21. <th class="heads" width="15%" nowrap="nowrap" align="left">Marktwert in Euro</th>
    22. <th class="heads" width="25%" nowrap="nowrap" align="left">Bemerkung</th>
    23. </tr>
    24. '.$lm10_row.'
    25. tr>
    26. <th class="heads" width="20%" nowrap="nowrap" align="left"></th>
    27. <th class="heads" width="5%" nowrap="nowrap" align="left"></th>
    28. <th class="heads" width="5%" nowrap="nowrap" align="left"></th>
    29. <th class="heads" width="25%" nowrap="nowrap" align="left">Gesamt</th>
    30. <th class="heads" width="15%" nowrap="nowrap" align="left"></th>
    31. <th class="heads" width="25%" nowrap="nowrap" align="left"></th>
    32. </table>';
    33. ?>
    Alles anzeigen
  • super danke ich bedanke mich ich möchte nur eines die summe soll unten in die tabelle da steht schon gesamt und da drunter muss das rein

    okay ich danke euch aber ich glaube das ich es aufgeben weil das alles net funzt also nochma danke für die hilfe

    Quellcode

    1. <?php
    2. if(!defined('pkFRONTEND') || pkFRONTEND!='public')
    3. die('Direct access to this location is not permitted.');
    4. if(!getrights('user'))
    5. {
    6. pkEvent('access_refused');
    7. return;
    8. }
    9. $sname = pkgetconfig('site_name');
    10. $query = "SELECT _spi,_nr,_pos,_st,_ver,_mkw,_bem SUM(_mkw) AS gesamtMarktwert FROM ".phpkit_spieler." WHERE _ver LIKE 'SV Werder Bremen' ORDER BY _nr ";
    11. $test = $SQL->query($query);
    12. while ($row = $SQL->fetch_array($test)){
    13. eval("\$lm10_row.=\"".pkTpl("lm10_row")."\";");
    14. }
    15. echo'<table class="heads" align="center" width="100%" cellspacing="0" cellpadding="4">
    16. <tr>
    17. <th class="heads" width="20%" nowrap="nowrap" align="left">Spieler</th>
    18. <th class="heads" width="5%" nowrap="nowrap" align="left">Position</th>
    19. <th class="heads" width="5%" nowrap="nowrap" align="left">Stärke</th>
    20. <th class="heads" width="25%" nowrap="nowrap" align="left">Verein</th>
    21. <th class="heads" width="15%" nowrap="nowrap" align="left">Marktwert in Euro</th>
    22. <th class="heads" width="25%" nowrap="nowrap" align="left">Bemerkung</th>
    23. </tr>
    24. '.$lm10_row.'
    25. <tr>
    26. <th class="heads" width="20%" nowrap="nowrap" align="left"></th>
    27. <th class="heads" width="5%" nowrap="nowrap" align="left"></th>
    28. <th class="heads" width="5%" nowrap="nowrap" align="left"></th>
    29. <th class="heads" width="25%" nowrap="nowrap" align="left">Gesamt</th>
    30. <th class="heads" width="15%" nowrap="nowrap" align="left">'.$lm11_row.'</th>
    31. <th class="heads" width="25%" nowrap="nowrap" align="left"></th>
    32. </table>';
    33. ?>
    Alles anzeigen


    das ist mein aktueller code und was dabei raus kommt seht ihr hier test