[Catalyst] DBIx question
Charlie Garrison
garrison at zeta.org.au
Fri Aug 24 16:31:42 GMT 2007
Good morning,
On 24/8/07 at 7:57 AM -0700, Will Smith <willbelair at yahoo.com> wrote:
> I have a multiple join, and trying to sort the dataset using oder_by, and get either error, or do
>not sort.
> my code is:
> # table: calls,property,city . property has many calls, city has many property, calls belong
>to property, property belong to city
> my $rs = [$c->model('myappDB::City')->search(
> {
> 'calls.CallerID' => '1',
> 'calls.CallStatusID' => '0'
> },
> {
> order_by => 'city.CityName'
> },
> {
> join => { 'property' => 'calls'
> }
> }
> )];
>
> How can I sort by CityName ?
Have you tried:
order_by => 'me.CityName'
The 'base' table is aliased as 'me'.
Charlie
--
Charlie Garrison <garrison at zeta.org.au>
PO Box 141, Windsor, NSW 2756, Australia
O< ascii ribbon campaign - stop html mail - www.asciiribbon.org
http://www.ietf.org/rfc/rfc1855.txt
More information about the Catalyst
mailing list