Mail templates
I want to send several emails in my Cake PHP app. Is there a way to make use of the existing template system in Cake? I do not want to specify the message body directly in the code. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: Mail templates
Thanks alot. I searched for mail with the help of the wiki search but nothing turned up. After you pointed out that there are some articles dealing with this topic, I looked at the table of contents on the front page of the wiki and discovered some useful tutorials. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: custom queries
Isn't there a solution? Could the CakePHP framework build this query internally? (I haven't dealt with associations yet) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: custom queries
Thanks for your advice. I have already played with associations, but I could not figure out, how I can get the number of comments associated with each post. (see the query I presented in the initial post) In the source code of the CakePHP framework I discovered an attribute counterQuery (part of the hasMany array), but it seems that the functionality isn't implemented yet. But to get back to the inital question: Suppose a certain very complex query cannot be rewritten with the use of associations: How can I refer to table names in a flexible manner, so that prefixes are added by the framework automatically? Yes - you need to look into associations, but it's not that hard: Here's a good starting point http://wiki.cakephp.org/tutorials:book_titles. If you set DEBUG to 2, you will see all the SQL queries at the bottom of your page. Cheers, AD7six --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: custom queries
I guess where are talking at cross purposes. As long as you use the build-in method (with associations etc.) for retrieving data from the database everything works well. But I want to use a custom query, where the automatic construction of table names does not happen, as far as I know. I'm all out of fish for today ;) The code I pasted above is using a Model instance, not a table. It's taken from code that I use on more than one DB setup, and using prefixes. By default the table name is the same as the model name but it doesn't have to be. You'll find you can modify your DB setup however you want (including on the fly if you need) - the answers to all your questions are in the wiki (amongst other places). Happy coding, AD7six --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---