Good morning,

On 24/8/07 at 7:57 AM -0700, Will Smith <[EMAIL PROTECTED]> 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  <[EMAIL PROTECTED]>
   PO Box 141, Windsor, NSW 2756, Australia

O< ascii ribbon campaign - stop html mail - www.asciiribbon.org
http://www.ietf.org/rfc/rfc1855.txt

_______________________________________________
List: [email protected]
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/

Reply via email to