ch08: Hilfe bei Abfrage MySQL

Beitrag lesen

Auch so funktioniert es leider nicht:

  
SELECT  
	a.articleID,  
	a.articleTextFull,  
	  
	b.userAlias AS articleAuthor,  
	  
	d.elementName AS articleCategory  
	  
FROM articles AS a  
  
INNER JOIN user AS b  
	ON (a.articleAuthor = b.userID)  
	  
LEFT JOIN relation AS c  
	ON (a.articleID = c.relationLink)  
	  
LEFT JOIN elements AS d  
	ON (c.elementID = d.elementID)  
	  
WHERE ((c.relationType = 'article') OR (c.relationType IS NULL))  
	AND ((d.elementType = 'category') OR (d.elementType IS NULL))  
	AND (a.articleID = '2')