hmpf I am sorry I need more help...
I did false-back (mean I did my wrong naming in again as I use it
current, will have to clean up all later...)
it crashes if I try to run the find()
Warning (512): SQL Error: 1054: Unknown column
'BookingPosition.AnreiseDatum' in 'field list'
I am shure field-name is correct, had a lookup on phpmyadmin
I added a recursive=>2 without changing any.
Perhaps I need to add I am not using any report model as there is no
db-table reports as I get data from different tables.
I added a var $uses =
array('Request','Booking','Customer','BookingPosition','Meal'); to
head of controller.
Also without effect.
$this-
>loadModel('Request','Booking','Customer','BookingPosition','Meal');
$this->data = $this->Request->find('all', array(
'recursive' => 2,
'fields' => array(
'DISTINCT BookingPosition.AnreiseDatum',
'BookingPosition.AbreiseDatum',
'Request.name',
'Request.AnzahlErwachsene',
'Request.AnzahlJugendliche',
'Request.AnzahlKinder',
'Request.meal0_id',
'Request.meal1_id',
'Request.meal2_id',
'Meal.name',
'Booking.name',
'Lodging.zimmernummer',
'CONCAT (CS.name, CS.Firma, CS.Vorname, CS.Nachname) AS
kunde'
),
'order' => array('Bookingposition.anreise_datum')
));
-------
How, step-by-step, do I need to go on to do different reports?
My idea is as far like this:
- create a reports_controller (how to tell wich models to be available
for find()?)
- add my own functions like report_arrivals() report_leaveres(),
report_mealstocook
- add one view per function to show the result of the functions
but
I am not sure about
how and where to set wich part of code to get and display the data.
thinking mvc the model would supply it.
But as I use many models I think I ll have to collect the data in my
controllers functions
and pass it somehow to the views to be shown (would like to use html-
>tablecells to do so)
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 [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