diff options
author | dakkar <dakkar@luxion> | 2005-10-25 13:01:24 +0000 |
---|---|---|
committer | dakkar <dakkar@luxion> | 2005-10-25 13:01:24 +0000 |
commit | 49618f03be76614f011e420fae0399150a1e0d6a (patch) | |
tree | e8e31ba69060949841a5cc2876a883639ac5d279 /lib/Bookmarks/M/DB/Tags.pm | |
parent | r704@narval2: dakkar | 2005-10-21 16:58:52 +0200 (diff) | |
download | Bookmarks-49618f03be76614f011e420fae0399150a1e0d6a.tar.gz Bookmarks-49618f03be76614f011e420fae0399150a1e0d6a.tar.bz2 Bookmarks-49618f03be76614f011e420fae0399150a1e0d6a.zip |
r705@narval2: dakkar | 2005-10-21 18:39:41 +0200
workaround per bug in CDBI::Loader: 'use LinksTags' esplicito in Links
ora mostra tag correlati
Diffstat (limited to 'lib/Bookmarks/M/DB/Tags.pm')
-rw-r--r-- | lib/Bookmarks/M/DB/Tags.pm | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Bookmarks/M/DB/Tags.pm b/lib/Bookmarks/M/DB/Tags.pm index 2bf38aa..b01695a 100644 --- a/lib/Bookmarks/M/DB/Tags.pm +++ b/lib/Bookmarks/M/DB/Tags.pm @@ -5,11 +5,12 @@ use strict; __PACKAGE__->has_many( links => ['Bookmarks::M::DB::LinksTags' => 'link'] ); __PACKAGE__->set_sql('related_tags', <<'END_SQL'); -SELECT tags.pk +SELECT DISTINCT tags.pk FROM tags, links_tags lt1, links_tags lt2 WHERE tags.pk = lt1.tag - AND lt2.link = lt2.link + AND lt1.link = lt2.link AND lt2.tag = ? + AND lt1.tag != lt2.tag END_SQL __PACKAGE__->set_sql('popularity', <<'END_SQL'); |