- Readme First! - Read and follow the rules, otherwise your posts will be closed
There are currently, 62 guest(s) and 1 member(s) that are online. You are Anonymous user. You can register for free by clicking here
Nuke Cops :: View topic - Need help with this php code [ ]
Author
Message
Beretta
Sergeant
Joined: Sep 30, 2005
Posts: 88
Location: Indiana USA
Posted:
Tue Apr 18, 2006 4:37 am
I wanna use this php code in a block can someone put this php code in a block format for me?I want it to be seen on the right hand side of my site.
Code:
require('connect.php');
require('setting.php');
mysql_select_db("truebl_season",$db);
$mysql_query = "SELECT name as n, sum(points/gps) as ppg FROM fullstats GROUP BY n ORDER BY ppg DESC LIMIT 5";
$st = mysql_query($mysql_query, $db) or die(mysql_error());
$row_st = mysql_fetch_assoc($st);
$totalRows_st = mysql_num_rows($st);
?>
</strong></p>
<div align="center">
<table width="169" border="1" align="center" cellpadding="1" cellspacing="0" bordercolor="red">
<tr bgcolor="black">
<td colspan="2" align="left"><div align="center"><font size="3"><strong><span class="style3"><font color="red">POINTS</font></span></strong></font></div></td>
</tr>
<tr bgcolor="black">
<td width="68%" align="left" class="style1"><strong><font color="red" size="3">Name</font></strong></td>
<td width="32%" align="center"><strong><span class="style1"><font color="red" size="3">PPG</font></span></strong></td>
</tr>
<?php do { ?>
<tr bgcolor="#FFFFFF">
<td align="left"><font size="2"><strong><a href="<?PHP echo "http://truebl.hostingrapid.com/stats/player.php?name=".$row_st['n'].""; ?>"><?php echo $row_st['n']; ?></a></strong></font></td>
<td align="center"><font size="2"><strong><?php echo round($row_st['ppg'],1); ?></strong></font> </td>
</tr>
<?php } while ($row_st = mysql_fetch_assoc($st)); ?>
<?php
mysql_select_db("lhfliv_season",$db);
$mysql_query = "SELECT name as n, sum(steal/gps) as spg FROM fullstats GROUP BY n ORDER BY spg DESC LIMIT 5";
$st = mysql_query($mysql_query, $db) or die(mysql_error());
$row_st = mysql_fetch_assoc($st);
$totalRows_st = mysql_num_rows($st);
?>
</strong></p>
<div align="center">
<table width="169" border="1" align="center" cellpadding="1" cellspacing="0" bordercolor="red">
<tr bgcolor="black">
<td colspan="2" align="left"><div align="center"><font size="3"><strong><span class="style3"><font color="red">STEALS</font></span></strong></font></div></td>
</tr>
<tr bgcolor="black">
<td width="68%" align="left" class="style1"><strong><font color="red" size="3">Name</font></strong></td>
<td width="32%" align="center"><strong><span class="style1"><font color="red" size="3">SPG</font></span></strong></td>
</tr>
<?php do { ?>
<tr bgcolor="#FFFFFF">
<td align="left"><font size="2"><strong><a href="<?PHP echo "http://truebl.hostingrapid.com/stats/player.php?name=".$row_st['n'].""; ?>"><?php echo $row_st['n']; ?></a></strong></font></td>
<td align="center"><font size="2"><strong><?php echo round($row_st['spg'],1); ?></strong></font> </td>
</tr>
<?php } while ($row_st = mysql_fetch_assoc($st)); ?>
<?php
mysql_select_db("truebl_season",$db);
$mysql_query = "SELECT name as n, sum(rebounds/gps) as rpg FROM fullstats GROUP BY n ORDER BY rpg DESC LIMIT 5";
$st = mysql_query($mysql_query, $db) or die(mysql_error());
$row_st = mysql_fetch_assoc($st);
$totalRows_st = mysql_num_rows($st);
?>
<tr bgcolor="black">
<td colspan="2" align="left"><div align="center"><font size="3"><strong><span class="style3"><font color="red">REBOUNDS</font></span></strong></font></div></td>
</tr>
<tr bgcolor="black">
<td width="68%" align="left" class="style1"><strong><font color="red" size="3">Name</font></strong></td>
<td width="32%" align="center"><strong><span class="style1"><font color="red" size="3">RPG</font></span></strong></td>
</tr>
<?php do { ?>
<tr bgcolor="#FFFFFF">
<td align="left"><font size="2"><strong><a href="<?PHP echo "http://truebl.hostingrapid.com/stats/player.php?name=".$row_st['n'].""; ?>"><?php echo $row_st['n']; ?></a></strong></font></td>
<td align="center"><font size="2"><strong><?php echo round($row_st['rpg'],1); ?></strong></font> </td>
</tr>
<?php } while ($row_st = mysql_fetch_assoc($st)); ?>
<?php
mysql_select_db("truebl_season",$db);
$mysql_query = "SELECT name as n, sum(assist/gps) as apg FROM fullstats GROUP BY n ORDER BY apg DESC LIMIT 5";
$st = mysql_query($mysql_query, $db) or die(mysql_error());
$row_st = mysql_fetch_assoc($st);
$totalRows_st = mysql_num_rows($st);
?>
<tr bgcolor="black">
<td colspan="2" align="left"><div align="center"><font size="3"><strong><span class="style3"><font color="red">ASSISTS</font></span></strong></font></div></td>
</tr>
<tr bgcolor="black">
<td width="68%" align="left" class="style1"><strong><font color="red" size="3">Name</font></strong></td>
<td width="32%" align="center"><strong><span class="style1"><font color="red" size="3">APG</font></span></strong></td>
</tr>
<?php do { ?>
<tr bgcolor="#FFFFFF">
<td align="left"><font size="2"><strong><a href="<?PHP echo "http://truebl.hostingrapid.com/player.php?name=".$row_st['n'].""; ?>"><?php echo $row_st['n']; ?></a></strong></font></td>
<td align="center"><font size="2"><strong><?php echo round($row_st['apg'],1); ?></strong></font> </td>
</tr>
<?php } while ($row_st = mysql_fetch_assoc($st)); ?>
<?php
mysql_select_db("truebl_season",$db);
$mysql_query = "SELECT name as n, sum(block/gps) as bpg FROM fullstats GROUP BY n ORDER BY bpg DESC LIMIT 5";
$st = mysql_query($mysql_query, $db) or die(mysql_error());
$row_st = mysql_fetch_assoc($st);
$totalRows_st = mysql_num_rows($st);
?>
<tr bgcolor="black">
<td colspan="2" align="left"><div align="center"><font size="3"><strong><span class="style3"><font color="red">BLOCKS</font></span></strong></font></div></td>
</tr>
<tr bgcolor="black">
<td width="68%" align="left" class="style1"><font color="red" size="3"><strong>Name</strong></font></td>
<td width="32%" align="center"><strong><span class="style1"><font color="red" size="3">BPG</font></span></strong></td>
</tr>
<?php do { ?>
<tr bgcolor="#FFFFFF">
<td align="left"><font size="2"><strong><a href="<?PHP echo "http://truebl.hostingrapid.com/stats/player.php?name=".$row_st['n'].""; ?>"><?php echo $row_st['n']; ?></a></strong></font></td>
<td align="center"><font size="2"><strong><?php echo round($row_st['bpg'],1); ?></strong></font> </td>
</tr>
<?php } while ($row_st = mysql_fetch_assoc($st)); ?>
</table>
<p> <br>
<?php
$query_gp = "SELECT * FROM boxscore ORDER BY id DESC LIMIT 5 ";
$gp = mysql_query($query_gp, $db) or die(mysql_error());
$row_gp = mysql_fetch_assoc($gp);
$totalRows_gp = mysql_num_rows($gp);
?>
</p>
</div>
<table width="165" height="215" border="1" cellpadding="4" cellspacing="0" bordercolor="red">
<tr bgcolor="black">
<td colspan="2" align="left"><div align="center"><font color="black" size="3"><span class="style3"><strong><font color="red">RECENT
SCORES</font></strong></span></font></div></td>
</tr>
<?php do { ?>
<tr>
<td width="93"><font color="red" size="2"><?PHP echo $row_gp['team']; ?></font> </td>
<td width="10"><center>
<font color="red" size="2"><?php echo $row_gp['score']; ?></font>
</center></td>
</tr>
<tr>
<td width="93"><font color="red" size="2"><?php echo $row_gp['opponent']; ?></font> </td>
<td width="10"><center>
<font color="red" size="2"><?php echo $row_gp['score1']; ?></font>
</center></td>
</tr>
<tr bgcolor="black">
<td colspan="2" align="left"><font color="red" size="2"> </font></td>
</tr>
<?php } while ($row_gp = mysql_fetch_assoc($gp)); ?>
</table>
<p> </p>
<p> </p>
<p> </p>
<p> </p></td>
Beretta
Sergeant
Joined: Sep 30, 2005
Posts: 88
Location: Indiana USA
Posted:
Tue Apr 18, 2006 4:28 pm
dang cant get no help lol
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum