Gossamer Forum
Home : Products : DBMan : Customization :

browse_cat=1

Quote Reply
browse_cat=1
re,
i can list 1 field with this JPD sub :

for ($i = 0; $i <= $#db_cols; $i++) {
if ($db_cols[$i] eq "Titre") {
$fieldnum = $i; $found = 1;
last;
}
}
if (!$found) {
&cgierr("No Area field defined");
}

open (DB, "<$db_file_name") or &cgierr("unable to open $db_file_name. Reason: $!");
if ($db_use_flock) {
flock(DB, 1);
}
LINE: while (<DB> ) {
next if /^#/;
next if /^\s*$/;
$line = $_;
chomp ($line);
@fields = &split_decode ($line);
if (!(grep $_ eq $fields[$fieldnum], @selectfields)) {
push (@selectfields, $fields[$fieldnum]);
}
++$count{$fields[$fieldnum]};
}
close DB;
</PRE>

But i want to make this under 2 or 3 fields...???
Is't possible ?

Stéphane

--------------------
Stephane Pouyllau
Archaeology labs "Ausonius"
33607 Pessac
FRANCE
Subject Author Views Date
Thread browse_cat=1 StephanePouyllau 1165 Jan 24, 2001, 6:18 AM
Post Re: browse_cat=1
LoisC 1105 Jan 24, 2001, 7:19 PM