Check this! :)

http://book.cakephp.org/view/1017/Retrieving-Your-Data

--
Lep pozdrav, Tilen Majerle
http://majerle.eu



2011/5/16 Dominik Gajewski <[email protected]>

> Hi
> I have proble to retrive data from my database
>
> I have 3 models
>
> DepartmentBook, DiseaseCourse, DirectoryDisease
>
> and
>
> DepartmentBook hasMany DiseaseCourse,
> DirectoryDisease hasOne DiseaseCourse
>
> I have to retrive data using DepartmentBook
>
> $this->DepartmentBook->find('all', array('conditions' =>
> array(  'MainBook.user_data_id' => $userId)));
>
> , so also i have access to DiseaseCourse, but i would like to get data
> from DirectoryDisease. How should i create cake query?
>
> P.S. MainBook is in relation only with DepartmentBook -> MainBook
> hasMany DepartmentBook
>
> --
> Pozdrawiam
> Dominik Gajewski
>
> --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
>
>
> To unsubscribe from this group, send email to
> [email protected] For more options, visit this group
> at http://groups.google.com/group/cake-php
>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
[email protected] For more options, visit this group at 
http://groups.google.com/group/cake-php

Reply via email to