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 7153 Apr 9, 2003, 8:41 AM
Thread Re: [bf] How to display unrelated files by date?
jai 7043 Apr 9, 2003, 4:18 PM
Thread Re: [jai] How to display unrelated files by date?
bf 7010 Apr 10, 2003, 2:51 PM
Thread Re: [bf] How to display unrelated files by date?
jai 7028 Apr 10, 2003, 4:28 PM
Thread Re: [jai] How to display unrelated files by date?
bf 7024 Apr 10, 2003, 4:46 PM
Thread Re: [bf] How to display unrelated files by date?
charly 6944 May 7, 2003, 4:56 AM
Thread Re: [charly] How to display unrelated files by date?
604 6935 May 7, 2003, 1:24 PM
Thread Re: [TheStone] How to display unrelated files by date?
charly 6933 May 7, 2003, 2:36 PM
Thread Re: [charly] How to display unrelated files by date?
604 6939 May 7, 2003, 2:42 PM
Thread Re: [TheStone] How to display unrelated files by date?
charly 6953 May 7, 2003, 2:55 PM
Thread Re: [charly] How to display unrelated files by date?
604 6923 May 7, 2003, 3:12 PM
Post Re: [TheStone] How to display unrelated files by date?
charly 6829 May 21, 2003, 7:09 AM