well it looks like it didnt work well after all... i still have a problem with the same select statement..
like when i have a bookmark with 2 tags on it, it will echo twice. when there is just one tag it will show just one.
i want this end result.
1 unique bookmark with all its tags. (like all bookmark_id get shown once)
<?php $result = mysql_query("
SELECT b.bookmark_naam, b.bookmark_url, t.tag_id, t.tag_naam
FROM bookmarks b
LEFT JOIN bookmarks_tags bt ON bt.bookmark_id = b.bookmark_id
INNER JOIN tags t ON t.tag_id = bt.tag_id");
$prevbookmark = "";
while($row = mysql_fetch_assoc($result)) {
if($row['bookmark_naam'] != $prevbookmark)
{
echo "<h2><a href=\"{$row['bookmark_url']}\">{$row['bookmark_naam']}</a></h2>tags: ";
$prevbookmark = $row['bookmark_naam'];
}
echo "<span>";
echo "<a href=\"index.php?t={$row['tag_id']}\">{$row['tag_naam']} </a>";
echo "</span>";
}?>