ChrisB: Versuche Daten aus Mysql zu bekommen

Beitrag lesen

Hi,

  $result\_content\_2 = mysql\_query("select \* from tb\_content a, tb\_comment b, rel\_commentcontent c where '$con\_id' = c.id\_content and b.id = c.id\_comment");  

Das geht alles nur werden die comments so auf dupliziert wie content Elemente vorhanden sind.

Das liegt daran, dass du mit deiner Abfrage das Kreuzprodukt der beteiligten Tabellen bildest.

Beschaftige dich mit JOINs.
http://aktuell.de.selfhtml.org/artikel/datenbanken/

MfG ChrisB

--
“Whoever best describes the problem is the person most likely to solve the problem.” [Dan Roam]