Finally we found the easy mod to search for any col:
Replace:
# Now let's search the links table, but first figure out any filters.
$linkdb = new Links::DBSQL "$LINKS{admin_root_path}/defs/Links.def";
my %filter = ();
foreach my $col (@{$linkdb->{db_cols}}) {
if ($in->param($col)) {
$filter{$col} = $in->param($col);
}
}
$link_hits = $linkdb->query ( { query => $query, mh => $mh, nh => $nh, filter => \%filter, ww => $ww } );
$link_count = $linkdb->hits || 0;
$link_errors = $linkdb->query_errors;
with:
# Now let's search the links table, but first figure out
# any filters.
my $idsinfo;
$linkdb = new Links::DBSQL "$LINKS{admin_root_path}/defs/Links.def";
my %filter = ();
foreach my $col (@{$linkdb->{db_cols}}) {
if ($in->param($col)) {
$filter{$col} = $in->param($col);
}
}
if ($in->param('IDS'))
{
$idsinfo = $in->param('IDS');
}
else
{
$idsinfo = 'query';
}
$link_hits = $linkdb->query ( { $idsinfo => $query, mh => $mh, nh => $nh, filter => \%filter, ww => $ww } );
$link_count = $linkdb->hits || 0;
$link_errors = $linkdb->query_errors;
Now you can enter a query like:
http://www.yourdomain.com/cgi-bin/search.cgi?query=15&IDS=ID
to display the Link with ID 15
Cheers
Niko
http://www.master-productions.com