I’m attempting to make a table of the compatibilities of people. All these people are in the the table “subjects” in my MYSQL databse and values a-i assigned. Unfortunately, my attempts have failed repeatedly, but I don’t know why. Here is the code I thought would work:
[code]$result = mysql_query(SELECT * FROM subjects WHERE sex = ‘1’ ");
$row = mysql_fetch_array($result);
$result1 = mysql_query(SELECT * FROM subjects WHERE sex = ‘0’ ");
$row1 = mysql_fetch_array($result1);
Don’t worry about the calculation for $distance, I copied that from a page that works. And $maxdistance is defined earlier on the page. I think my problem involves embedding one while statement inside another. If you can either fix my code, or suggest another way to accomplish my task, I would be greatly indebted.