Articles tagged with "models"
unbindAssociation
I needed a quick dynamic way to remove numerous associations I had in recent application. I decided the best to do that was through unbindAssociation(), so I made it.
This code was adapted from expects(), a function developed by Tom O'Reilly & expanded by Mariano Iglesias. As mentioned below I didn't want to maintain lists of models, so I adapted the code to remove associations instead.
[Read more] This code was adapted from expects(), a function developed by Tom O'Reilly & expanded by Mariano Iglesias. As mentioned below I didn't want to maintain lists of models, so I adapted the code to remove associations instead.
Generate Excel spreadsheets from your database
With CakePHP you can easily create views from database models. At times, however, you need to output your database model as a spreadsheet file. In this article I'll show how you can use PEAR's Spreadsheet_Excel_Writer class to generate an Excel spreadsheet with CakePHP.
[Read more] Optimizing your CakePHP elements and views with caching
As I have developed my CakePHP application, I have discovered new and useful functions every day - and today I want to talk to you about caching, and how easily it can be implemented. When I implemented it on my front page, I went from having 7 database queries down to 1.
[Read more]
Latest Comments