Jump to content
MakeWebGames

Recommended Posts

Posted

Here is my last bit of jail.php i have the players diplay pics showing in the jail. works wonderfull.

[mysql]$q=$db->query("SELECT u.*,c.* FROM users u LEFT JOIN gangs c ON u.gang=c.gangID WHERE u.jail > 0 ORDER BY u.jail DESC");

while($r=$db->fetch_row($q))

{

print "\n<tr>

<td><a href='viewuser.php?u={$r['userid']}'>{$r['username']}

{$r[</a></td>

<td>{$r['level']}</td>

<td>{$r['jail']} minutes</td>

<td>{$r['jail_reason']}</td>

<td>[Bust]

[Bail]</td>

</tr>";

}

print "</table>";

$h->endpage();

?>[/mysql]

but it will not work in the hospital.

here is the same sections of code from the page in hospital.php

[mysql]$q=$db->query("SELECT u.userid, u.username, u.level, u.hospital, u.hospreason, u.gang, c.* FROM users u LEFT JOIN gangs c ON u.gang=c.gangID WHERE u.hospital > 0 ORDER BY u.hospital DESC",$c);

while($r=$db->fetch_row($q))

{

print "\n<tr>

<td><a href='viewuser.php?u={$r['userid']}'>{$r['username']}

{$r[</a></td>

<td>{$r['level']}</td>

<td>{$r['hospital']} minutes</td>

<td>{$r['hospreason']}</td>

</tr>";

}

print "</table>";

}

$h->endpage();

?>[/mysql]

can anyone please tell me why the images will not show in the hospital, but show in the jail ? ?(

Posted

Try that.

$hosp = $db->query("SELECT u.*, g.* FROM users u LEFT JOIN gangs g ON u.gang=g.gangID WHERE u.hospital >= 1 ORDER BY u.hospital DESC");
while($t = $db->fetch_row($hosp))
{
echo'<tr>';
echo sprintf("<td><a href='viewuser.php?u=%u'>%s
[img=%s]</a></td>" $t['userid'], $t['username'], $t['display_pic']);
echo sprintf("<td>%u</td>", number_format($t['level']));
echo sprintf("<td>%u minutes</td>", number_format($t['hospital']));
echo sprintf("<td>%s</td>", $t['hospreason']);
echo'</tr>';
}
echo'</table>';
}
$h->endpage();
?>
Posted

I re-did it for ya, didnt know 100% what you needed, heres the easy fix,

$q=$db->query("SELECT u.userid, u.username, u.level, u.hospital, u.hospreason, u.display_pic, u.gang, c.* FROM users u LEFT JOIN gangs c ON u.gang=c.gangID WHERE u.hospital > 0 ORDER BY u.hospital DESC",$c);

You didnt select the display pic, where in jail, and my scipt, it was selected. Hope that helps more.

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...