Jump to content
MakeWebGames

Help Yourgang.php file mccodes v2


blackhawk

Recommended Posts

i cant figure out what is wrong with this part of the script

 

 

 

 

function gang_warview()
{
    global $db, $ir, $c, $userid, $gangdata;
    $wq =
            $db->query(
                    "SELECT *
                     FROM `gangwars`
                     WHERE `warDECLARER` = {$ir['gang']}
                     OR `warDECLARED` = {$ir['gang']}");
    echo "<b>These are the wars your gang is in.</b><br />
    <table width='75%' cellspacing='1' class='table'>
        <tr>
            <th>Time Started</th>
            <th>Versus</th>
            <th>Who Declared</th>
        </tr>";
    while ($r = $db->fetch_row($wq))
    {
        if ($gangdata['gangID'] == $r['warDECLARER'])
        {
            $w = 'You';
            $f = 'warDECLARED';
        }
        else
        {
            $w = 'Them';
            $f = 'warDECLARER';
        }
        $d = date('F j, Y, g:i:s a', $r['warTIME']);
        $ggq =
                $db->query(
                        "SELECT `gangID`, gangNAME`
                          FROM `gangs`
                          WHERE `gangID` = " . $r[$f]);
        $them = $db->fetch_row($ggq);
        echo "<tr>
                <td>$d</td>
                <td>
                    <a href='gangs.php?action=view&amp;ID={$them['gangID']}'>
                    {$them['gangNAME']}
                    </a>
                </td>
                <td>$w</td>
              </tr>";
    }
    echo "</table>";
}

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...