blackhawk Posted March 24, 2023 Posted March 24, 2023 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&ID={$them['gangID']}'> {$them['gangNAME']} </a> </td> <td>$w</td> </tr>"; } echo "</table>"; } Quote
peterisgb Posted March 25, 2023 Posted March 25, 2023 (edited) You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Only minor, Like myself, simple things, Just a quick look. Missed a ` in the sql query to get gangNAME, Fix Above Edited March 25, 2023 by peterisgb Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.