You haven't shown what code you're using for your find(). Assuming you
did something like ...
$this->set('product_collection', $this->ProCollectiontype-find(...))
Put debug($product_collection) in your view (set debug = 2 in
core.php) and you'll see the array structure. Probably, you'll do
something like:
foreach ($product_collection as $product)
{
...
On Thu, Jul 9, 2009 at 6:56 PM, leafchild<[email protected]> wrote:
>
>
> ProCollectiontype hasMany ProProduct.
>
> ProCollectiontype edit view page show this query:
> SELECT `ProProduct`.`id`, `ProProduct`.`pro_collectiontype_id`,
> `ProProduct`.`sku`, `ProProduct`.`style_num`,
> `ProProduct`.`pro_size_id`, `ProProduct`.`pro_color_id`,
> `ProProduct`.`pro_scent_id`, `ProProduct`.`price`,
> `ProProduct`.`display` FROM `pro_products` AS `ProProduct` WHERE
> `ProProduct`.`pro_collectiontype_id` = (1)
>
> Also count show 7 and that is correct so it's getting what I need (I
> think...)
>
>
> How can I access there data. I don't think I need to create another
> query to get these data since it's already getting automatically.
> I need to do foreach to make a list of these data. What do I need to
> do in controller to make this information available in view?
>
> Thanks
>
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---