On 24 Apr., 10:41, WebbedIT <p...@webbedit.co.uk> wrote:
> Which controller are you running this from, I assumed you were running
> it from the BookingPosition Controller?
>
No, I did create a standalone controller without a model in content.
I try to do a lot of reports selecting data from all models together.
This for I think a special set of controller and views might be a
good ida.
So I created a reports_controller and a index.cpt in views/reports
Now I would like to get the data from the models i.e. using query or
find
create a set of informations from it
and display it an the different views
I aim to do this:
reports_controller - best linked to ALL models (but how to do so?)
containing functions
- arrivals_today
- leavings_today
- guests_today
- arrivals_thisweek
- leavings_thisweek
- guests_thisweek
=> getting data from customers, bookings, bookingpositions
- rooms_booked_today
- rooms_booked_thisweek
- materials_booked_today
- materials_booked_thisweek
=> getting data from rooms, requests, bookings, bookingpositions
... and so on
All to be shown in an index() like view.
As cake beginner I see one of my big problems in where to place what
part of code.
As I understood MVC usual I get data inside the model.
If I do my reports_controller I will have no Model called report, so I
need to get the data somehow and somewhere else.
I might use find or query to get the data. But do not know if to place
in view or controller best. And if placed in controlelr not clear how
to pass to view (using set?)
Hope I made my point clear and you might help me to understand and use
cake a bit better.
btw: just did upgrade to 1.3stable
CU
Michael
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