Jump to content

select not retrieving all rows


flemingmike

Recommended Posts

hello, im only getting the second half of my results showing in my dropdown box.  here is my code.

 

if(isset($_GET['id']))
{
$uid = $_GET['id'];
}

$forward = mysql_query("SELECT * FROM players WHERE status = '1' AND position = 'forward' ORDER BY name");
$forward1="";
while($row1 = mysql_fetch_array($forward))
  {
$forwardid=$row1["id"];
$forwardname=$row1["name"];
$forwardteam=$row1["team"];
$forward1.="<OPTION TITLE=\"$forwardteam\" VALUE=\"$forwardid\">".$forwardname.'</option>';
  }

$result = mysql_query("SELECT * FROM picks WHERE uid = '$uid' AND pickid = 'forward1'");
while($row = mysql_fetch_array($result))
{
  $playerid=$row['playerid'];
}

if(isset($forwardpick1)) {
$result1 = mysql_query("SELECT * FROM players WHERE id = '$playerid'");
while($row1 = mysql_fetch_array($result1))
{
  $forwardpick1=$row1['name'];   
}
$forwardpick1="<br /><br /><font color ='#000000' size = '5'><b>$forwardpick1";
} else {
$forwardpick1="
<form method='POST' action='draftpick.php' name='forward1'>
<p><font color='#000000'><select size='1' name='player'>
<?php echo '$forward1'; ?>
</select><br><br><input type='submit' value='Submit' name='submit'></font></p>
</form>
";
}

 

any direction is appreciated.

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.