I have 2 tables in mysql, one is called info and one is called stats. On my webpage, I'm making a table using information from both of the mysql tables. I made a field in each mysql table called id so that I could have a reference from one table to another.. I hope that makes sense.
In any case, I'm trying to write a formula that will allow me to access both tables throughout my webpage. The related section of my code so far:
$results = mysql_query("SELECT * FROM info,stats WHERE info.id = stats.id AND id=$_REQUEST[id]");
echo "<table align=\"center\" border='1' width=\"100%\">";
while($row = mysql_fetch_array($results))
{
<<<my table codes here- this does work if I only use one table>>>
}
echo "</table>";
Any suggestions? I'm pretty new to php and self-taught, so if I've used any wrong terms or if you need more information, please let me know.
Thank you.