Yeah, you don't have to write SQL as you can use the regular $this- >Model->findAll() methods. Reference: >http://book.cakephp.org/view/73/Retrieving-Your-Data But, I found for myself that writing sql syntax is sometimes easier. Now, it looks like you want to have models. You need the views too, and you definitely need a controller. So, your question is really how to do it, not how to avoid using controllers and models, as far as I understand. If you post here all the relevant code to output the reports, we'll help you fix the errors and whatnot.
There is a ton of information in the book (http://book.cakephp.org/) that can help you out. Basically you need to create models for your database, request information from the models and pass it to the view (or to a helper function, which John Andersen calls "element"), and then print that data. It's pretty easy. Start writing it and ask specific questions here. -Victor On Apr 22, 7:08 am, mivogt-LU <[email protected]> wrote: > To generate somer report data I want to execute a short sql command to > collect some data and hand it over as array to the html->table helper > to be displayed. > > sql code is > SELECT > BP.AnreiseDatum, BP.AbreiseDatum, BS.name, LS.Zimmernummer, > concat(CS.name,': ',CS.Firma,': ', CS.Vorname,', ', CS.Nachname) > FROM `booking_positions` as BP, `bookings` as BS , lodgings as LS, > customers as CS > WHERE bs.id = bp.`booking_id` AND `lodging_id`=LS.id AND > `customer_id`=CS.id > > is there a better way to solve this using the find()? > > How do I need to do the views manually (as the bake shell will not be > of use as far as I understood...) > > Thanks in advance > > Michael > > Check out the new CakePHP Questions sitehttp://cakeqs.organd 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 > athttp://groups.google.com/group/cake-php?hl=en 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
