[Solved] Join 3rd Table in MYSQL [closed]


SELECT 
  coll.title AS CollectionTitle, 
  cont.CollectionID, 
  cont.title AS ContainerTitle, 
  cont.ID as ContainerID, 
  cont.LevelContainerID,
  cont.ContentID,
  user.Title,
  user.Value,
  user.EADElementID 
FROM tblCollections_Content cont 
JOIN  tblCollections_Collections coll 
  ON cont.collectionid = coll.id 
JOIN tblCollections_UserFields user
  ON cont.ContentId = user.ContentId
WHERE cont.title is NOT NULL 
ORDER BY CollectionID, ContainerID

I have to assume you have a ContentID column in your tblCollections_Content to join to your tblCollections_UserFields and that the columns you specified are all in the tblCollections_UserFields table.

Depending on the referential integrity of these tables you might need to use outer joins to see all the rows.

solved Join 3rd Table in MYSQL [closed]