Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Table Relation Problem

Quote Reply
Table Relation Problem
Hi,

I am having a problem I have not encountered before when trying to relate to tables. It seems when I try to relate the 'Links' table and they 'Reviews' table I get the following error:

Quote:


GT::SQL::Relation (64456): Bad columns / column clash: columns named 'SUM(Reviews.Review_Rating)' have been found in current relation, please qualify your expression.


I am wondering if it is an error in my syntax that I have not spotted, or just a problem with specifying the relation with these two tables.

Code:


my $relation_lr = $DB->table('Links','Reviews');
my $reviewsscore = $relation_lr->select('SUM(Reviews.Review_Rating)', { 'Links.LinkOwner' => $user } )->fetchrow_array;


The common table element in the relation being 'Reviews.Review_LinkID' <=> 'Links.ID'

The idea here, is to base the information on the owner of the link being reviewed, and not the owner of the review, hence the requirement for the relation.


http://www.iuni.com/...tware/web/index.html
Links Plugins

Last edited by:

Ian: Jun 30, 2002, 7:28 PM