Hi,
I'm getting there with fixing up your version.
The problem I'm having, is getting the values out of links_results_loop.
I've tried loads of stuff - but I'm not really 100% sure what format its actually in :/
doing a Dumper($args->{links_result_loop}) .. gives what I would expect ...i.e:
Code:
$VAR1 = [
{
..values for link 1
},
{
..values for link 2
},
{
..values for link 3
}
]
.. but the way I'm thinking its gonna have to work - is by doing something like:
1) Loop through links_results_loop - getting the links ID number, and saving them like 1,2,3,4,5 into the link_results field.
2) The, in query_cache(), get it to grab the Link ID's from the link_result table - and get each of the results (this is still gonna be a hell of a lot quicker than doing full searches for repeat queries).
The problem as I said - is I can't work out the syntax of getting out the values of the hashref's inside $args->{links_result_loop}
BTW - the reason it wasn't adding the entries into the SearchCache table was because the "keyword" field was blank - $ENV{QUERY_STRING} was returning nothing, so I'm using this now to get the query string:
Code:
sub get_values {
my @input;
foreach my $key ($IN->param()) {
my $value = $IN->param($key);
push @input, "$key=$value";
}
return join("&",@input);
}
..and that seems to be working a treat
Cheers
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my
Amazon Wish List GLinks ULTRA Package | GLinks ULTRA Package PRO Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin |
Pre-Made Template Sets |
FREE GLinks Plugins!