Hey guys, I'm trying to use a php variable in a mysql statement, but I can't get it to work. What I want to do is something like:
$IDQuery = mysql_query("SELECT * FROM Player_Info WHERE WholeName = '$WholeName'");
$IDQueryResult = mysql_fetch_assoc($IDQuery);
$PlayerID = $IDQueryResult['PlayerID'];
I want sql to return the row that matches my variable, $WholeName, which is defined earlier (the vaule for that is pulled from the Player_Info table so it should always work). I then want to take the info from the PlayerID column (should be only 1 row and 1 column returned) and save it as a variable $PlayerID.
I've tried everything but I cant get it to work. Does anyone see something wrong??