I've a growing reviews table that I would like to search with Links SQL, is this possible? I'm an intermediate perl programmer, so I can do it myself I just don't want to reinvent the wheel, it looks to me links can be modified to make searches in other tables possible.
Feb 26, 2003, 11:00 PM
Veteran / Moderator (2199 posts)
Feb 26, 2003, 11:00 PM
Post #2 of 4
Views: 2094
You can use the 'query' method on a 'table' object'. Have a look at the GT module docs, under GT::SQL::Table.
Ivan
-----
Iyengar Yoga Resources / GT Plugins
Ivan
-----
Iyengar Yoga Resources / GT Plugins
Nov 30, 2003, 5:06 AM
Veteran (1921 posts)
Nov 30, 2003, 5:06 AM
Post #4 of 4
Views: 2004
This is possible if you rewrite the Review.pm file. It needs quite a lot of changing so I made the decision to make the changes directly in this file rather than trying to write a plugin - you just need to be aware that you'll need to make sure that you use this file (or redo the changes) if you upgrade.
I don't have a copy of the original file any more so I'm not quite sure what changes I made.
Firstly you need to add $args->{query} here:
# Return error if no action
($args->{query} or $id)
Then you need to add an extra elsif clause
elsif ($args->{query}) {
$rec = { noLink => 1};
$args->{Review_LinkID} = '';
$args->{Review_Owner} = '';
}
after the elsif ($args->{user}){...} code
I'm sure that there are a few other changes that I've made - if anyone would like to pm me their Review.pm file I'll try comparing them to see what I've done.
I don't have a copy of the original file any more so I'm not quite sure what changes I made.
Firstly you need to add $args->{query} here:
# Return error if no action
($args->{query} or $id)
Then you need to add an extra elsif clause
elsif ($args->{query}) {
$rec = { noLink => 1};
$args->{Review_LinkID} = '';
$args->{Review_Owner} = '';
}
after the elsif ($args->{user}){...} code
I'm sure that there are a few other changes that I've made - if anyone would like to pm me their Review.pm file I'll try comparing them to see what I've done.