OK i created the table with fake data laid out like the diagram…
[php]
Scoreboard Table
<table id="left-overall-header" width="100%" border="0">
<tr>
<td> </td>
<td><div align="center">
<!-- Start Left Side Team -->
<table id="left-team" width="100%" border="1">
<tr>
<th><div align="center">US</div></th>
</tr>
</table>
<!-- End Left Side Team -->
</div></td>
<td> </td>
</tr>
<tr>
<td colspan="3"><div align="center">
<!-- Start Left Side Data Headers -->
<table id="left-DataHeaders" width="100%" border="1">
<tr>
<th><div align="center">Player</div></th>
<th><div align="center">Squad</div></th>
<th><div align="center">K/D</div></th>
<th><div align="center">Score</div></th>
</tr>
</table>
<!-- End Left Side Data Headers -->
</div></td>
</tr>
</table>
<br />
<!-- Start Left Side Data -->
<table id="left-data" width="100%" border="1">
<tr>
<td><div align="center"><a href="#">Adam</a></div></td>
<td><div align="center">Alpha</div></td>
<td><div align="center">25/2</div></td>
<td><div align="center">1100</div></td>
</tr>
<tr>
<td><div align="center"><a href="#">Adam</a></div></td>
<td><div align="center">Alpha</div></td>
<td><div align="center">25/2</div></td>
<td><div align="center">1100</div></td>
</tr>
<tr>
<td><div align="center"><a href="#">Adam</a></div></td>
<td><div align="center">Alpha</div></td>
<td><div align="center">25/2</div></td>
<td><div align="center">1100</div></td>
</tr>
<tr>
<td><div align="center"><a href="#">Adam</a></div></td>
<td><div align="center">Alpha</div></td>
<td><div align="center">25/2</div></td>
<td><div align="center">1100</div></td>
</tr>
<tr>
<td><div align="center"><a href="#">Adam</a></div></td>
<td><div align="center">Alpha</div></td>
<td><div align="center">25/2</div></td>
<td><div align="center">1100</div></td>
</tr>
</table>
<!-- End Left Side Data --></td>
<!-- End Left Side -->
<!-- Start Break between left/right -->
<td></td>
<!-- End Break between left/right -->
<td><!-- Start Right Side -->
<table id="Right-overall-header" width="100%" border="0">
<tr>
<td> </td>
<td><div align="center">
<!-- Start Right Side Team -->
<table id="right-team" width="100%" border="1">
<tr>
<th><div align="center">RU</div></th>
</tr>
</table>
<!-- End Right Side Team -->
</div></td>
<td> </td>
</tr>
<tr>
<td colspan="3"><div align="center">
<!-- Start Right Side Data Headers -->
<table id="Right-DataHeaders" width="100%" border="1">
<tr>
<th><div align="center">Player</div></th>
<th><div align="center">Squad</div></th>
<th><div align="center">K/D</div></th>
<th><div align="center">Score</div></th>
<th><div align="center">Stats</div></th>
</tr>
</table>
<!-- End Right Side Data Headers -->
</div></td>
</tr>
</table>
<br />
<!-- Start Right Side Data -->
<table id="right-data" width="100%" border="1">
<tr>
<td><div align="center"><a href="#">John</a></div></td>
<td><div align="center">Alpha</div></td>
<td><div align="center">25/2</div></td>
<td><div align="center">1100</div></td>
</tr>
<tr>
<td><div align="center"><a href="#">John</a></div></td>
<td><div align="center">Alpha</div></td>
<td><div align="center">25/2</div></td>
<td><div align="center">1100</div></td>
</tr>
<tr>
<td><div align="center"><a href="#">John</a></div></td>
<td><div align="center">Alpha</div></td>
<td><div align="center">25/2</div></td>
<td><div align="center">1100</div></td>
</tr>
<tr>
<td><div align="center"><a href="#">John</a></div></td>
<td><div align="center">Alpha</div></td>
<td><div align="center">25/2</div></td>
<td><div align="center">1100</div></td>
</tr>
<tr>
<td><div align="center"><a href="#">John</a></div></td>
<td><div align="center">Alpha</div></td>
<td><div align="center">25/2</div></td>
<td><div align="center">1100</div></td>
</tr>
</table>
<!-- End right Side Data --></td>
<!-- End right Side -->
|
[/php]
so using my code or some variation of my code how would i get it to display properly?
[php]<?php
$con=mysqli_connect(“host”,“user”,“pass”,“dbname”);
// Check connection
if (mysqli_connect_errno())
{
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}
$query = ‘SELECT
cp.Soldiername,
cp.Kills,
cp.Deaths,
cp.Score,
s.squadName,
t.teamName
FROM
tbl_currentplayers AS cp
LEFT JOIN tbl_teams AS t ON t.teamID = cp.TeamID
LEFT JOIN tbl_squads AS s ON s.squadID = cp.SquadID
ORDER BY
t.teamID ASC,
s.squadName ASC’;
$result = mysqli_query($con,$query);
$num_rows = $result->num_rows;
if($num_rows > 0) {
echo “<table class=“onlinePlayers”>
<TH colspan=“2”>US<TH colspan=“2”>RU
Squad |
K/D |
Squad |
K/D |
”;
while($row = mysqli_fetch_array($result, MYSQLI_ASSOC);){
echo “
”;
echo “<a href=“https://i-stats.net/index.php?action=pcheck&player=” . $row[‘Soldiername’] . “&game=BF3&sub=Check+Player” target=_blank>” . $row[‘Soldiername’] . “ | ”;
echo “” . $row[‘teamName’] . “ | ”;
echo “” . $row[‘squadName’] . “ | ”;
echo “” . $row[‘Kills’] . “/” . $row[‘Deaths’] . “ | ”;
echo “
”;
}
}else {
echo “<table class=“onlinePlayers”>”;
echo “
<td colspan=“5”>No Players Online
” ;
}
echo “
<td colspan=“5”><a class=“button” href=”#" target="_blank">Play Now!
" ;
echo “”;
mysqli_close($con);
?> [/php]