Featured Post

To blog or not to blog…..

….that is the question. I have been considering writing a blog for some time now, but haven’t really had the enthusiasm to go through with it. Now I feel is the right time as I now feel confident enough to sell my wares as a web developer. Hopefully this blog will provide some incite into...

Read More

Bulk record update in Cakephp

Posted by Duncan | Posted in cakePHP | Posted on 21-08-2009

Tags:

3

I’m sure there are many ways of doing this, but recently I finally got round to figuring out how to update multiple records at a time.  When I started out all I wanted was to give all the selected records the same value for one database field, so the first thing we need to know is which records need to be updated and which field. To do this all you need is a list with your records (I’m using portfolios) inside a form with some check boxes and a select box with a list of actions.