John
That's it. Thanks very much!!! :)
Here is the complete code with columns, if needed:
[code]
sort(array('asc' =>'id v', 'desc'
=>'id ^'), 'id'); ?>
sort(array('asc' =>'forename v',
'desc' =>'forename ^'), 'forename'); ?>
sort(array('asc' =>'sur
No, not that way, you have to use your existing code and use an inner
loop, example:
[code]
<- your outer loop! Good!
...
...
<- the inner loop!
...
[/code]
The outer loop gives you an array containing the 'staff' and the
'room' arrays.
The inner loop takes the room array
John
Hello,
i tryed:
[code]
,
[/code]
But with that code i get the following error-message: "Warning (2):
Illegal offset type [APP\views\staffs\index.ctp, line 40]".
Where is my fault?
Thanks very much!
Check out the new CakePHP Questions site http://cakeqs.org and hel
Do a foreach loop on the $staff['Room'] array in the table cell!
Enjoy,
John
On Feb 3, 9:24 am, sebb86 wrote:
> Hello,
> in my database, there is a HABTM association between model "rooms" and
> "staffs".
> In my index-view of "staffs", when i retrieve the data, i'd like to
> have an extra colu
Hello,
in my database, there is a HABTM association between model "rooms" and
"staffs".
In my index-view of "staffs", when i retrieve the data, i'd like to
have an extra column for each datarow with all rooms, which belongs to
the current staff(id).
The join table contains "room_id" and "staff_id"