Visualizzazione dei risultati da 1 a 10 su 14

Hybrid View

  1. #1
    Utente di HTML.it L'avatar di clasku
    Registrato dal
    Aug 2006
    Messaggi
    3,197
    Prova così

    Codice PHP:
    $thread_qry1 "SELECT * FROM `xt_teams` AS u, `xt_player` AS m WHERE (u.name_team = m.team_name AND m.accepts = 1) ORDER BY u.console_team";

    $row1 XenForo_Application::get('db')->fetchAll($thread_qry1);

    $teamCurrent '';
    $i 1;
    $count 1;
    $size count($row1);

    $category '';


    foreach ( 
    $row1 AS $rows1 ) {

        if(
    $category != $rows1['console_team']){
            echo 
    "la categoria";
            
    $category $rows1['console_team'];
        }

        if (
    $teamCurrent != $rows1['name_team'])
        {
            
    $ii $i++;
            if(
    $teamCurrent != '') echo ('</div>');
            echo (
    '<h2 class="trigger01">
            <div style="height:100px; width:100%; background-color:red"></div>
            </h2>
            <div class="containerTeam">

            <div style="height:50px; width:100%; background-color:green"></div>

            '
    );

            
    $teamCurrent $rows1['name_team'];
        }

        echo (
    '
        <div style="height:50px; width:100%; background-color:yellow"></div>
        '
    );

        if(
    $count == $size)
        echo (
    '</div>');
        
    $count ++;


  2. #2
    Utente di HTML.it
    Registrato dal
    Sep 2013
    Messaggi
    61
    Mi pare di aver risolto cosi:

    $thread_qry1 = "SELECT * FROM `xt_teams` AS u, `xt_player` AS m WHERE (u.name_team = m.team_name AND m.accepts = 1) ORDER BY u.console_team";

    $row1 = XenForo_Application::get('db')->fetchAll($thread_qry1);

    $thread_qry12 = "SELECT * FROM `xt_console`"; // numero reale delle categorie

    $row12 = XenForo_Application::get('db')->fetchAll($thread_qry12);

    $teamCurrent = '';
    $i = 1;
    $count = 1;
    $size = count($row1);

    $category = '';
    $i12 = 1;
    $count12 = 1;
    $size12 = count($row12);



    foreach (
    $row1 AS $rows1 ) {



    if($category != $rows1['console_team']){ $ii12 = $i12++;
    if($category != '') echo ('</div>');
    echo ('<div style="height:auto; width:100% ; margin-bottom:20px">'.$rows1['console_team'].'');


    }

    if (
    $teamCurrent != $rows1['name_team'])
    {
    $ii = $i++;
    if(
    $teamCurrent != '') echo ('</div>');
    echo (
    '<h2 class="trigger01">
    <div style="height:100px; width:100%; background-color:red"></div>
    </h2>
    <div class="containerTeam">

    <div style="height:50px; width:100%; background-color:green"></div>

    '
    );

    $teamCurrent = $rows1['name_team'];
    }

    echo (
    '
    <div style="height:50px; width:100%; background-color:yellow"></div>
    '
    );

    if(
    $count == $size)
    echo (
    '</div>');
    $count ++;

    $category = $rows1['console_team'];

    if($count12 == $size12)
    echo ('</div>');
    $count12 ++;


    }
    echo ('</div>');



Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.