I'm having a similar issue.... In the form, I allow users to select multiple checkboxes which are all linked to one database field. When I try to save the form, it won't allow me since it's trying to save the array instead of the contents.... Since everything is automated, how can we add the multiple selections to the database?
On Feb 24, 10:44 am, Stu <[email protected]> wrote: > This should be fairly easy to find in the docs, did you bake your app > using the bake script? or is it all from scratch? > > Also if you have multiple choices for one field, radio buttons should > be used instead of check boxes (Usually the standard form completion > protocol). > > However if you would like to add something in the database somewhere > in your controllers, this works for me: > > $query = " UPDATE table SET field = '". $value .'" WHERE field = '". > $idvalue ... and ... whatever ... > (Create a string with your sql query). > > $update = $this->Model->query($query); > > I usually use this for setting date/time when user logs in. > Are you trying to add just one value to the database? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
