Display/Show records that are unmatched from an inner join

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Soap]     [Kernel Newbies]     [Yosemite]     [Yosemite Campsites]

  Powered by Linux