I am trying to fetch data from one database table to another. I have been able to this with SQL's JOIN feature but I cannot figure out how to isolate a single result from the database and display it to the corresponding user's profile page. As of now, all the entries stored in the database are shown and not the corresponding one. How would I go about solving this?
Every single possible combination of inner and outer, left and right joins with both databases to try and only display the one entry for the user.
<?
$result=mysql_query("SELECT nea_profile.fullname, nea_profile.dob,nea_profile.bio 
                    FROM nea_profile 
                        JOIN nea_users ON nea_profile.userid = nea_users.userid 
                    WHERE nea_users.fullname = nea_profile.fullname");
?>
<div class="column">
<h2>About</h2>
    <div align="center">
        <table border="8">
             <?
                while ($row=mysql_fetch_array($result)) { 
                    echo "<tr><td><b>Full Name</b> - $row[fullname] 
                    echo "<td><b>Born</b> - $row[dob]</td></tr>";
                    echo "<tr><td>$row[bio]</td><td></td></tr>";
                }
            ?>
        </table>
    </div>
As previously mentioned, every entry is displayed and not the one that corresponds to the user.
 
     
    