Set up a belongsTo relationship in your Project model.

var $belongsTo = array('Status');

should be enough.

On May 24, 2:27 pm, pete <[EMAIL PROTECTED]> wrote:
> hi,
> i still play around with creating a simple relation, and i don't get
> it to run.
> thanks
> pete
>
> TABLES:
> status
>   id
>   description
>
> project
>   id
>   status_id
>   project_title
>
> CONTROLLER
>   $this->set('projects', $this->Project->findAll());
>
> every project has one status.
> how do i create a relation between these 2 tables so i can print the
> status.description and not only the status.id
>
> VIEW
> project_title: Test
> status: Open ??


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