i am doing a select two get there users pokemon id
$sql = "SELECT * FROM user_pokemon WHERE username='$_SESSION[username]'"; $result = mysql_query($sql) or die(mysql_error()); $battle_get = mysql_fetch_array($result); echo $battle_get['pok1'];
This works fine and prints it out
but now i wanna match there poke1 id up with the id of the pokemon in the main pokemon table
$sql1 = "SELECT pokeID FROM pokemon WHERE pokeID=='$battle_get['pok1']'"; $result1 = mysql_query($sql) or die(mysql_error()); $battle_get111 = mysql_fetch_array($result); echo $battle_get11['pokeID'];
Why don't this work ? i think i need two post the data into the were ?