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 5405 Apr 9, 2003, 8:41 AM
Thread Re: [bf] How to display unrelated files by date?
jai 5315 Apr 9, 2003, 4:18 PM
Thread Re: [jai] How to display unrelated files by date?
bf 5286 Apr 10, 2003, 2:51 PM
Thread Re: [bf] How to display unrelated files by date?
jai 5302 Apr 10, 2003, 4:28 PM
Thread Re: [jai] How to display unrelated files by date?
bf 5300 Apr 10, 2003, 4:46 PM
Thread Re: [bf] How to display unrelated files by date?
charly 5227 May 7, 2003, 4:56 AM
Thread Re: [charly] How to display unrelated files by date?
604 5217 May 7, 2003, 1:24 PM
Thread Re: [TheStone] How to display unrelated files by date?
charly 5216 May 7, 2003, 2:36 PM
Thread Re: [charly] How to display unrelated files by date?
604 5222 May 7, 2003, 2:42 PM
Thread Re: [TheStone] How to display unrelated files by date?
charly 5236 May 7, 2003, 2:55 PM
Thread Re: [charly] How to display unrelated files by date?
604 5206 May 7, 2003, 3:12 PM
Post Re: [TheStone] How to display unrelated files by date?
charly 5111 May 21, 2003, 7:09 AM