Jump to content

quick question


joebudden

Recommended Posts

hi guys,

 

Iv got a query which returns a list of players names that are displayed in a table.

 

What I want to do is have these in 3 separate tables so they dont run right down the page..

 

Does anyone know of a way i could do this with using separate queries ???

 

cheers

 

 

also does anyone know what this means -->       

 

i get it on all of my pages and its quite annoying lol

Link to comment
https://forums.phpfreaks.com/topic/50244-quick-question/
Share on other sites

<?php
// get players A - J
$getPlayersSQL = "SELECT DISTINCT playerId,playerName,playerSurname FROM player ORDER BY playerSurname ASC";
$getPlayersRES = mysql_query($getPlayersSQL);
?>
<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post">
<table width="200px" border="1" align="center" cellpadding="0" cellspacing="0">
<tr><td></td><td>Player Name</td></tr>
<?php
while($players = mysql_fetch_assoc($getPlayersRES))
{
// hold the players details in variables
$playerId = $players["playerId"];
$playerName = $players["playerName"];
$playerSurname = $players["playerSurname"];

// create the table rows
echo "<tr>";
echo "<td align=\"center\"><input type=\"checkbox\" name=\"add_players[]\" value=\"$playerId\" /></td>";
echo "<td align=\"center\">";
?>
<a href="javascript:openWindow('playerInformation.php?playerId=<?php echo $playerId;?>', 500, 400, 200, 200)">
<?php
echo $playerName."<b> ";
echo $playerSurname."</b>";
?>
</a>
<?php
echo "</td>";
}
echo "</tr>";
}
?>
</table>
</form>

Link to comment
https://forums.phpfreaks.com/topic/50244-quick-question/#findComment-246613
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.