Thanks very much for your help, jeepin.
I've tried to implement your suggestion, but I have messed up some how. My database should have returned a single result, as there's only one record in addon_notify with gachiev set as '1'. My goal was to have the addon_notify being of primary importance and using phpbb_users only to get the email address for the uid found in addon_notify. Instead, I got a result for every record in phpbb_users, whether or not they had a record in addon_notify with gachiev being '1'. Here's the code I used:
$query3 = "SELECT * FROM phpbb_users LEFT JOIN addon_notify ON user_id = uid AND gachiev = 1";
$result3 = mysql_query ($query3) or die('MySQL error: ' . mysql_error() . '<hr/>' . $query3);
$result_rows3 = mysql_num_rows($result3);
if($result_rows3 > '0'){
// Somebody needs to be told about this.
while ($row3 = mysql_fetch_assoc ($result3)) {
$fid = $row3['uid'];
$email = $row3['user_email'];
echo("fid is ".$fid." and email is ".$email.".");
}
}
Your thoughts would be very welcome.