Hallo

I'm new to cakePHP and quite excited. I've been looking for something
like this for quite some time.
Started off with 1.1 and moved over to 1.2 immediately. Its been a bit
of a struggle.

I've got 2 models:

class Dealer extends AppModel
{

        var $name='Dealer';

        var $validate=array();

        var $belongsTo = array(
                        'Country'=>array('className'=>'Country')
                );

}

class Country extends AppModel
{

        var $name='Country';

        var $hasMany = array(
                        'Dealer'=>array('className'=>'Dealer')
                );

}

My countries table has 2 fields, id and name and my dealers table
references it with country_id.

When a dealer registers (using add action), I need to generate a
<select> list so that the dealer may select which country is home. I'm
trying to get this right without using a custom query.
Surely this must be a common problem, but I can't find anything
documenting how to do this.

Please help!

Thanks
Bary

--~--~---------~--~----~------------~-------~--~----~
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