Here is what I am trying to do. I have two tables, Member and MemberTemp. I want to select all the information from Member usernames that do not exist in MemberTemp. I wrote the following code to do this:
$query = "SELECT * FROM Member LEFT JOIN MemberTemp
ON Member.username=MemberTemp.username
WHERE MemberTemp.username IS NULL";
$result = mysql_query($query);
$num_rows = mysql_num_rows($result);
echo $num_rows;
while ($row = mysql_fetch_array($result,MYSQL_ASSOC))
{
extract($row);
echo $username;
}
$num_rows outputs the correct number of rows, but I receive absolutely no output from the $username variable. I don't know why I cannot access any of the variables in $row.
Can you help me? Is my query or my php wrong?
THANK YOU FOR YOUR HELP. I'VE BEEN STUCK FOR A LONG TIME.