Gossamer Forum
Home : Products : DBMan SQL : Discussion :

How to display unrelated files by date?

Quote Reply
How to display unrelated files by date?
Awhile ago TheStone supplied this Global to allow data from unrelated files to be used in templates

sub {
my ($table, $field, $value) = @_;
my $sth = $DB->table($table)->select({ $field => $value });
my @output;
while (my $rs = $sth->fetchrow_hashref ) {
push @output, $rs;
}
return { loop_hash => \@output };
}

It works very well but another requirement has raised it's ugly face and I need to do the same thing but display the items by date, most often the files are not entered in order and this global will just display the output as it finds them in the files.

Or is there another way?

Thanks.....
Subject Author Views Date
Thread How to display unrelated files by date? bf 7227 Apr 9, 2003, 8:41 AM
Thread Re: [bf] How to display unrelated files by date?
jai 7116 Apr 9, 2003, 4:18 PM
Thread Re: [jai] How to display unrelated files by date?
bf 7082 Apr 10, 2003, 2:51 PM
Thread Re: [bf] How to display unrelated files by date?
jai 7101 Apr 10, 2003, 4:28 PM
Thread Re: [jai] How to display unrelated files by date?
bf 7096 Apr 10, 2003, 4:46 PM
Thread Re: [bf] How to display unrelated files by date?
charly 7016 May 7, 2003, 4:56 AM
Thread Re: [charly] How to display unrelated files by date?
604 7007 May 7, 2003, 1:24 PM
Thread Re: [TheStone] How to display unrelated files by date?
charly 7005 May 7, 2003, 2:36 PM
Thread Re: [charly] How to display unrelated files by date?
604 7012 May 7, 2003, 2:42 PM
Thread Re: [TheStone] How to display unrelated files by date?
charly 7025 May 7, 2003, 2:55 PM
Thread Re: [charly] How to display unrelated files by date?
604 6997 May 7, 2003, 3:12 PM
Post Re: [TheStone] How to display unrelated files by date?
charly 6901 May 21, 2003, 7:09 AM