Gossamer Forum
Quote Reply
GT::SQL::Search and JOIN
How can I do a join with GT::SQL::Search?

the task is following

Code:

my $master_cond = new GT::SQL::Condition;
$master_cond->bool('AND');
$master_cond->add(forum_id_fk => IN => \$forums);

my $sth;
my $hits;

my $p = $DB->table('Bookmarks', 'Post');
$sth = $p->query_sth(
query => $term,
filter => $master_cond,
mh => $mh,
nh => $pg,
sb => $sb,
so => $so,
bool => 'AND',
);
$hits = $p->hits();


how can I join 'Bookmarks' and 'Post'?

With Bookmarks table alone it works fine even with internal indexing, but I need some restrictions on forum_id. So I have do join on post_id_fk=post_id.

The error:
Code:
gforum.cgi: GT::SQL::Relation (24332): Unknown method 'weight' called at ....../gforum/admin/GT/SQL/Search/NONINDEXED/Search.pm line 187.


I know, that I know nothing.

Last edited by:

eoeser: Jun 23, 2007, 3:19 PM
Subject Author Views Date
Thread GT::SQL::Search and JOIN eoeser 1861 Jun 23, 2007, 3:17 PM
Post Re: [eoeser] GT::SQL::Search and JOIN
eoeser 1772 Jun 26, 2007, 12:23 PM