practice.
I have a Projectcategories table that has many Projects.
A Project has many Projectimages. What I want to do is to get the
Projectcategory and a random image for each Project from
Projectimages.
For example:
Array
(
[Projectcategory] => Array
(
[id] => 2
[title] => Residential
[alias] => residential
[imagepath] =>
[weight] => 1
[published] => 1
)
[Project] => Array
(
[0] => Array
(
[id] => 1
[category_id] => 2
[title] => Project title
[weight] => 1
[published] => 1
[Projectimage] => Random image from Projectimages
table
)
)
)
I hope I am making my self clear :)
Any ideas?
Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
No comments:
Post a Comment