Hi Your question is not much clear. Use table name prefix of your all fields if you have unique id in your both table; otherwise what you written that's fine Thanks, Muthukumar Selvarasu, Project Manager (Web Development), Webmasters Ltd. From: php-objects@xxxxxxxxxxxxxxx [mailto:php-objects@xxxxxxxxxxxxxxx] On Behalf Of Ken Sent: Tuesday, January 01, 2008 6:14 AM To: php-objects@xxxxxxxxxxxxxxx Subject: Display/Show records that are unmatched from an inner join I have gotten the SQL query to get me the result that there were 153 records. My problem is how to show me the unique ID of each of the 153 records that were not matched from both tables... Like I stated, I have the SQL inner join query working just trying to display each of the 153 records that weren't in both tables Do I have my While statement messed up? //build and issue query $table_name = "BaseMissingPerson"; $table_name1 = "Arch_1"; $sql = "SELECT * FROM $table_name left join $table_name1 on $table_name.NIC = $table_name1.NIC where isnull($table_name1.NIC)"; $result = @mysql_query($sql,$connection) or die(mysql_error()); $num = mysql_num_rows($result); while ($row=mysql_fetch_array($result,MYSQL_ASSOC)) { $ncount++; $nic = $row['$table_name1.NIC']; $nam = TRIM($row['NAM']); $oca = trim($row['OCA']); $mke = $row['MKE']; echo "<br>$nic--$nam--$oca--$mke--$ncount"; } Any assistance would be appreciated Ken [Non-text portions of this message have been removed]