__PACKAGE__->set_sql(regions_sorted => qq{ SELECT customer.id, customer.name, region.name FROM customer INNER JOIN region ON customer.region = region.id ORDER BY region.name DESC }); sub retrieve_sorted_by_region { my $class = shift; my $sth = $class->sql_regions_sorted; $sth->execute or carp "Error: $DBI::errstr"; return $class->sth_to_objects($sth); }
In reply to Re: Re: Class::DBI and sql order by
by Anarion
in thread Class::DBI and sql order by
by arc_of_descent
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |