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.
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.