Sorry its a typo. All field names are in lower case.
I'm failing to display the town. But when I use debug($Practitioner)
the practitioner fields and practice towns are all displayed as shown
below:
array
(
[0] => Array
(
[Practitioner] => Array
(
[id] => 233
[region_id] => 2
[country_id] => 5
[status_id] => 1
[role_id] => 2
[bsrno] => 241
[surname] => Bossley
[name] => Bronwyn
[cell] => 0215656765
[password] =>
dd4e8d1e0dfeb4ace2dda0fdfc8db83948109151
[created] => 0000-00-00 00:00:00
[modified] => 2011-05-05 11:11:45
)
[Practice] => Array
(
[0] => Array
(
[id] => 233
[practitioner_id] => 233
[region_id] => 2
[country_id] => 5
[name] => Main
[Telephone] => +61 411673912
[Address] => 15 Edna Street, Carrimundi,
Queensland, 4551, Australia
[town] => Carrimundi
)
)
)
>From my own understanding I thought the containable behaviour helps to
filter out unwanted results so as to improve the overall response
time. At the moment I'm interested in displaying the practise town.
On Jul 21, 3:13 pm, Jeremy Burns | Class Outfit
<[email protected]> wrote:
> Not sure if it's a typo, but your field names should be lower case.
>
> Look at the Containable behaviour
> (http://book.cakephp.org/view/1323/Containable).
>
> Jeremy Burns
> Class Outfit
>
> http://www.classoutfit.com
>
> On 21 Jul 2011, at 14:10, mthabisi mlunjwa wrote:
>
>
>
>
>
>
>
> > I have two models: Practitioner and Practice
>
> > Practitioner hasMany Practice and
> > Practise Belongs to Practitioner
>
> > The practise model has the following fields id,Practitioner_id, Name,
> > Town etc.
> > The Practitioner model has the following fields id,Surname, Name, Cell
> > etc.
>
> > In my controller I used a find function:
> > $Practitioner = $this->Practitioner->find('all');
> > $this->set(compact('Practitioner'));
>
> > In my view I want to display the practitioner name, Surname, cell,
> > practice name and practice town.
>
> > I can display practitioner name, Surname and cell using code like this
> > $Practitioners['Practitioner']['cell']
> > But I'm failing to display the corresponding practitioner's practice
> > name and practice town. I've tried using: $Practitioners['Practice']
> > ['town']; to display town but it looks like nothing gets displayed.
>
> > How can I display town? Please help thanks in advance
>
> > --
> > Our newest site for the community: CakePHP Video
> > Tutorialshttp://tv.cakephp.org
> > Check out the new CakePHP Questions sitehttp://ask.cakephp.organd help
> > others with their CakePHP related questions.
>
> > To unsubscribe from this group, send email to
> > [email protected] For more options, visit this group
> > athttp://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