Cannot understand why I am unable to search through two tables at once. I want be able to display the users name and their personal property, however when I try to run the script I get an error. Would be much appreciated if anyone could help. Here is my code. I know everything is pretty much spot on, just scratching my head wondering why it is not working.
<?
include "dbc.php";
mysql_connect($servername,$username,$password);
@mysql_select_db($database) or die( "Unable to select database");
$query="SELECT * FROM personal_information, personal_property WHERE personal_information.id=personal_property.id AND id=$id";
$result=mysql_query($query);
$num=mysql_numrows($result);
mysql_close();
$i=0;
while ($i < $num) {
$id=mysql_result($result,$i,"id");
$first_name=mysql_result($result,$i,"first_name");
$property_owned=mysql_result($result,$i,"property_owned");
?>