I need to pull data from 2 tables in my database. The data I pull from table 2 depends on the result of table 1.
I'm not amazing at all these JOINS and things, so if someone could just explain what kind of a JOIN i'd need here, and how it would look, i'd be grateful:
$sql_result = mysql_query("SELECT * FROM accounts WHERE id='$val'", $db);
$rs = mysql_fetch_array($sql_result); $name = $rs[name];
$sql_result2 = mysql_query("SELECT * FROM players WHERE name='$name'", $db);
$rs2 = mysql_fetch_array($sql_result2);