What kind of error do you get? And what relation is exactly between
Patients and Doserates tables (HABTM or one-to-many)?

On 14 дек, 07:34, Willey1986 <[email protected]> wrote:
> Hi!
>
> Im working with CakePHP for 6 months now, and at the moment I'm
> writing a small app.
> In this app, there are patients, medicaments and doserates. At the
> moment I'm trying to display the patients and their actual doserates
> on the patients/index page.
>
> The doserates have a foreign key patient_id, and a bool field "actual"
> for the actual doserate. Is ist possible to get only the "actual"
> doserates from the table and put them together with "their" patient in
> an array?
> At the Moment I'm getting an array where every patient has all its
> different doserates listed not only the actual one.
>
> I'm getting the records via $this->set('patients', $this->Patient->find
> ('all')) form my db.
> If I Use $this->Doserate->Patient->find('all') I'm only getting the
> patients that have doserates set.
>
> I tried $this->Patient->find('all', array('conditions' =>
> 'Doserate.actual' => '1')), but that ends in an error.
>
> Anyone has an idea?
>
> Sorry for my bad english, I'm from germany...
--~--~---------~--~----~------------~-------~--~----~
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