...

View Full Version : Select statement not displaying results



golffor1
02-18-2012, 06:19 AM
Hello I have the following code


$emailPlayers = mysql_query("SELECT players.player_email, players.Player_First_Name, players_paid.`paid_thru` FROM players_paid INNER JOIN players ON players_paid.Player_number = players.Player_number where players.Player_number like '$aDoor'", $link) or die (mysql_query());


//grab the e-mail addresses
while ($row = mysql_fetch_array($emailPlayers))
{
echo $row['Player_First_Name'];
echo "<br>";
echo $row['players_paid.paid_thru'];
echo "<br>";
echo $row['player_email'];
echo "<br>";
}
I am not able to display any information in the while loop. I was wondering if you could help me to figure this out.

mlseim
02-18-2012, 06:24 AM
Are you getting any results?

How many rows are being found?

echo mysql_num_rows($emailPlayers);

Maybe the answer to that is none?

golffor1
02-18-2012, 06:28 AM
The results you asked me to get show 0. But when I put the statement inside SQL and give it the same value that $aDoor was giving I get 4 results.

golffor1
02-18-2012, 06:31 AM
Got it...I was calling the wrong variable....thanks



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum