Steve Grosz wrote:
This is a follow up message to a earlier threat this week (which is included
in the message below)

"model","CREATE TABLE `model` (
  PRIMARY KEY  (`PID`)

"vendor","CREATE TABLE `vendor` (
  PRIMARY KEY  (`PID`)

"specs","CREATE TABLE `specs` (
  PRIMARY KEY  (`SpecID`)

Like Rhino suggested, you are joining on something other than your primary keys. Your query, slightly re-arranged for readability:


select *
  from vendor
  left outer join model on
    vendor.PID=model.VendorID
  left outer join specs on
    model.Model=specs.ProdModel
  where
    vendor.Vendor='#URL.Vendor#'

You are joining the model table on vendor.PID=model.VendorID, and model.VendorID is not a primary or unique key, it could contain duplicates. You are joining the specs table on model.Model=specs.ProdModel, neither is a primary key or unique, both could containt duplicates.

--
Roger


-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]



Reply via email to