Gossamer Forum
Home : Products : DBMan SQL : Discussion :

Re: [bf] How to display unrelated files by date?

Quote Reply
Re: [bf] How to display unrelated files by date? In reply to
Hi,

In your DBManSQL Admin click on the following links -

Help / GT Module Documentation / SQL / Table.

I think what you are looking for is the select_options function. You can use ORDER BY to get your dates returned in order.

Try something like the following (with your field_name in the ORDER BY)

sub {
my ($table, $field, $value) = @_;
$DB->table($table)->select_options('ORDER BY field_name');
my $sth = $DB->select({ $field => $value });

my @output;
while (my $rs = $sth->fetchrow_hashref ) {
push @output, $rs;
}
return { loop_hash => \@output };
}


Simon.
Subject Author Views Date
Thread How to display unrelated files by date? bf 7219 Apr 9, 2003, 8:41 AM
Thread Re: [bf] How to display unrelated files by date?
jai 7109 Apr 9, 2003, 4:18 PM
Thread Re: [jai] How to display unrelated files by date?
bf 7075 Apr 10, 2003, 2:51 PM
Thread Re: [bf] How to display unrelated files by date?
jai 7094 Apr 10, 2003, 4:28 PM
Thread Re: [jai] How to display unrelated files by date?
bf 7089 Apr 10, 2003, 4:46 PM
Thread Re: [bf] How to display unrelated files by date?
charly 7009 May 7, 2003, 4:56 AM
Thread Re: [charly] How to display unrelated files by date?
604 7000 May 7, 2003, 1:24 PM
Thread Re: [TheStone] How to display unrelated files by date?
charly 6998 May 7, 2003, 2:36 PM
Thread Re: [charly] How to display unrelated files by date?
604 7005 May 7, 2003, 2:42 PM
Thread Re: [TheStone] How to display unrelated files by date?
charly 7018 May 7, 2003, 2:55 PM
Thread Re: [charly] How to display unrelated files by date?
604 6990 May 7, 2003, 3:12 PM
Post Re: [TheStone] How to display unrelated files by date?
charly 6894 May 21, 2003, 7:09 AM