Hallo,
Ich habe wieder mal ein Problem :mrgreen:
Ich habe mehrere Tabellen:
-----------------
tags:
id | name
-----------------
news:
id | date | autor | title | article
-----------------
news_tags:
news_id | tag_id
-----------------
Sollte man eig. verstehen was ich da ereichen will!
ich will nun das man bei jedem Blog eintrag Die Tags des Blogeintrages angezeigt werden.
hab bis jetzt:
Dies zeigt aber erst die Einträge an! Nun muss ich noch die Dazugehörigen Tags haben. Wie lautet da der Mysql Syntax bzw. Code ??
Freu mich auch jede Antwort ;)
lg
Akronym
Ich habe wieder mal ein Problem :mrgreen:
Ich habe mehrere Tabellen:
-----------------
tags:
id | name
-----------------
news:
id | date | autor | title | article
-----------------
news_tags:
news_id | tag_id
-----------------
Sollte man eig. verstehen was ich da ereichen will!
ich will nun das man bei jedem Blog eintrag Die Tags des Blogeintrages angezeigt werden.
hab bis jetzt:
PHP:
$sql = "SELECT * FROM news ORDER BY date";
$result = mysql_query($sql)
while ($data = mysql_fetch_array($result)) {
$string = $data[article];
echo '<div class="post">';
echo '<div class="posttitle"><h2><a href="more.php?id=' . $data[id] . '">' . $data["title"] . '</a></h2>';
echo '</div>';
echo '<div class="entry">';
echo '<p>' . $string . '</p>';
echo '<div class="line">|' . $data[date] . '| Comments: 0 | Autor: ' . $data[autor] . '| #' . $data[id] . ' | <a href="more.php?id=' . $data[id] . '">Weiterlesen.</a>' . '</div>';
echo '</div>';
echo '</div>';
}
Freu mich auch jede Antwort ;)
lg
Akronym