Author: Zenon Panoussis

> I have built my index using this:
> HTDBDoc \
> SELECT concat( \
> [etc]
> FROM jobsadvertised \
> WHERE job_id='$1' and to_days(now()) - to_days(job_inp_dte) <= '$2' and site_type 
>= '$4' and job_location = '$3' and job_type = '$5'

> How do I pass the required values to indexer from my browser. 
> I.e, how will it know what $1 is etc...

This means that you have created your tables and that you are 
not using search.cgi, but are writing your own search scripts 
too. Well then you should look at the Perl DBI module and try 
something like 

#!/usr/bin/perl -w
use strict;
use DBI;
use CGI ':standard';
use CGI::Carp 'fatalsToBrowser';

my ($query) = @_;

print header();
print [insert your HTML here]
my $sth = $dbh->prepare("SELECT \"%$R::job%\"  FROM \"$R::table\"  WHERE parameter = 
\"$R::search_term\"  AND other_parameter LIKE \"%$R::other_term%\" GROUP BY 
while (my $ref = $sth->fetchrow_hashref()) {
  print "$ref->{'job'}","<br>\n";
print [more HTML]
print end_html();


You call this jobs.cgi. Then you create a search form in plain 
HTML with action=/cgi-bin/jobs.cgi where you name the input 
fields. The names that you have given to those input fields 
will be passed to the script in the form R::name and go straight 
where you want them.

Note that the above example is just a very quick adaptation of 
something I had ready, so it will most probably not work as it 
is. In any case, for this kind I things you might be screaming 
in wrong forum. You'd probably be better off asking questions 
in the apropriate database and/or perl module mailing lists.


Reply: <>

If you want to unsubscribe send "unsubscribe udmsearch"

Reply via email to