Hi All:

I'm fairly new to cakePHP.  Have been intently reading the cookbook
and tech blogs to try to glean as much info as I can on my own.  I
have hit a bit of a snag with a particular scenario I'm dealing with,
though, and cannot quite wrap my head around the concept of how I
might accomplish this task.  I'll start by laying out the tables
involved in the view I wish to render, with the necessary fields
listed.  Then, I'll try to explain what kind of view I'm after.

First, the tables:

accounts
=======
id (PK)

account_protocols
=============
id (PK)
account_id (FK)
scenario_id (FK)
account_protocol_type_id (FK)

account_protocol_types
=================
id (PK)
label

account_protocol_responses
=====================
id (PK)
account_protocol_id (FK)
response

scenarios
========
id (PK)
scenario_category_id (FK)

scenario_categories
===============
id (PK)
label

Okay... that's about it for the tables involved.  Now to try and
explain what I want to do in the view.  I want to generate a layered
list that looks like the following:

=== Scenario Category Label ===  (filtered by scenario_id attributed
to account_id)
   --- Scenario Label ---  (filtered by account_protocol_type)
     1. Protocol -> Protocol Response
     2. Protocol-> Protocol Response

So, the above would essentially output something like the following:

=== Support Issues ===
  --- Website Down ---
    1. Phone -> Webmaster (Ph. 555-555-5555)
    2. Phone -> Data Center (Ph. 666-666-6666)
=== Billing Issues ===
  -- Overbilling --
    1. Email -> Sales Manager (b...@testing.com)

I hope the details above are not too convoluted.  In the old days, I
would have simply cycled through each of the stages and used a foreach
() to handle the iterations in each layer.  However, I'm not sure how
to achieve this in the view under the MVC framework.  I've done some
reading about threaded lists via the the find method.  But I don't see
how I might arrive at my desired result with that method.  Perhaps I
require a bit of a re-think on the db normalization.  Any input and
insight on this would be greatly appreciated.  Thanks in advance!

Regards,

Pat Dupuis

--~--~---------~--~----~------------~-------~--~----~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to