trying to get generated results to show
#1
i am working on a script but i can't get it to work right.
this is the code i am working on
while($result = $db->fetch_array($query))

{
    $data1 = $result['clan'];
    $sql=$db->query("SELECT * FROM `fusion87g41_clan` WHERE clan='$data1'");
    
    

    while($clan=$db->fetch_array($sql))
    {
    $name=$clan['name'];
    $clans=$clan['clan'];
    
    $clanmates= "<tr>
                <td class='trow1'> $name</td>
                <td class='trow1'> $clans</td>
        </tr>";
            
    }
}



it shows on record but i am trying to get it to show more then one record.

btw i am using template for the custom page.

how do i get it to show more then one result on the template page

template page:

<html>

<head>
<title>Your title here</title>
{$headerinclude}
</head>
<body>
{$header}
<table border='0' cellspacing='1' cellpadding='4' class='tborder'>
       {$title}
        <tr>
                <td class='tcat'><span class='smalltext'><strong>Member</strong></span></td>
                <td class='tcat'><span class='smalltext'><strong>Clan</strong></span></td>
        </tr>
        {$clanmates}
</table>
{$footer}
</body>
</html>

Reply
#2
change

$clanmates= "<tr>
                <td class='trow1'> $name</td>
                <td class='trow1'> $clans</td>
        </tr>";

to

$clanmates .= "<tr>
                <td class='trow1'> $name</td>
                <td class='trow1'> $clans</td>
        </tr>";
Lost interest, sold my sites, will browse here once in a while. It's been fun.
Reply
#3
thanks never thought of that.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)