joebudden Posted May 6, 2007 Share Posted May 6, 2007 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 Quote Link to comment Share on other sites More sharing options...
neel_basu Posted May 6, 2007 Share Posted May 6, 2007 POst the SQL Query you are using. Quote Link to comment Share on other sites More sharing options...
joebudden Posted May 6, 2007 Author Share Posted May 6, 2007 <?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> Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.