I have in the db states/provinces which has the following fields

id              int(3)
abrev           varchar(5)       
name            varchar(45)      
region  varchar(3)       
        

These just end up in a drop down select and now they are sorted alphbeticaly
by name. But how can I sort is to all the States are grouped then Canadian
Provinces? I tried 

public function getStates()
      {
                  $params = array('contain' => false, 
                                                  'fields' => array(
        
'State.name'),
                                                  'order' => array(
        
'State.name ASC'
        
),
                                                  'group' => array(
        
'State.region'
        
),
                                                  
                                                  );
          $q = $this->State->find('list', $params);
          return $q;
      }

But then my drop down just shows Alaska and Alberta....

Can someone tell me what I amdoing wrong here?

Thanks
 
Dave 


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" 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