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
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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

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

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

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.