KI114 Posted September 24, 2007 Share Posted September 24, 2007 Why won't the second query work???? $query1 = mysql_query('SELECT * FROM gd_users WHERE ID = "'.mysql_real_escape_string($_SESSION['user_id']).'"'); $base_loc1 = $row1['base_loc']; $query4 = mysql_query('SELECT * FROM gd_planets WHERE id = "$base_loc1"') or die( mysql_error()); $row4 = mysql_fetch_array($query4); Quote Link to comment Share on other sites More sharing options...
alexrebs Posted September 24, 2007 Share Posted September 24, 2007 Why won't the second query work???? $query1 = mysql_query('SELECT * FROM gd_users WHERE ID = "'.mysql_real_escape_string($_SESSION['user_id']).'"'); $base_loc1 = $row1['base_loc']; $query4 = mysql_query('SELECT * FROM gd_planets WHERE id = "$base_loc1"') or die( mysql_error()); $row4 = mysql_fetch_array($query4); try: $query4 = mysql_query('SELECT * FROM gd_planets WHERE id = "'.$base_loc1.'"') or die( mysql_error()); Quote Link to comment Share on other sites More sharing options...
KI114 Posted September 24, 2007 Author Share Posted September 24, 2007 (edited) THANKS DUDE!!! YOU'RE AWESOME!!!!! lol its bugged me for weeks Edited September 24, 2007 by KI114 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.