Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New Coder
    Join Date
    Feb 2008
    Posts
    39
    Thanks
    0
    Thanked 1 Time in 1 Post

    Select statement not displaying results

    Hello I have the following code

    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.

  • #2
    Master Coder
    Join Date
    Jun 2003
    Location
    Cottage Grove, Minnesota
    Posts
    9,495
    Thanks
    8
    Thanked 1,089 Times in 1,080 Posts
    Are you getting any results?

    How many rows are being found?

    echo mysql_num_rows($emailPlayers);

    Maybe the answer to that is none?

  • #3
    New Coder
    Join Date
    Feb 2008
    Posts
    39
    Thanks
    0
    Thanked 1 Time in 1 Post
    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.

  • #4
    New Coder
    Join Date
    Feb 2008
    Posts
    39
    Thanks
    0
    Thanked 1 Time in 1 Post
    Got it...I was calling the wrong variable....thanks


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •