oops fixed my own problem..

the following worked:

$subdivisions = $this->Listing->find('all', array('fields'=>
'Listing.subdivision', 'order'=>'Listing.subdivision ASC'));
$subs = Set::combine($subdivisions, '{n}.Listing.subdivision',
'{n}.Listing.subdivision');
$this->set('subdivisions', $subs);

On Jan 2, 10:54 am, chad <[EMAIL PROTECTED]> wrote:
> Hi,
>
> Just upgraded to the newest 1.2 beta and i'm having troubles
> converting a generateList to the new find('list')...
>
> //worked before upgrade.. and still works but deprecated
> $subdivisions = $this->Listing->generateList(null,'Listing.subdivision
> asc',null,'{n}.Listing.subdivision','{n}.Listing.subdivision');
>
> //new way of doing the above (does not work... note: subdivision is
> not a primaryKey)
> $subdivisions = $this->Listing->find('list', array('fields'=>
> 'Listing.subdivision, Listing.subdivision',
> 'order'=>'Listing.subdivision ASC'));
> debug($subdivisions);
>
> debug outputs:
> Array
> (
>     [] =>
> )
>
> 7       SELECT `Listing`.`subdivision` FROM `listings` AS `Listing` WHERE 1
> = 1 ORDER BY `Listing`.`subdivision` ASC                626     626     6
> ------------
>
> Any help would be appreciated
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to