Possibly a little easier right now, but a mess to maintain. If the user has to add the Event first, then go through date by date reloading every time, then that's because you built the system that way. From my perspective it's easier to normalise and simplify now than it is to future-proof something like this duplication script.
And if you ever have to implement a search? Even more work now you have to deal with duplicated results. On Nov 2, 6:58 pm, Octavian <[email protected]> wrote: > Because I thought it would make things too complicated. The user would > have to add an event first, then add several days to it. Doing it all > in once seems me easier. > > I actually found the right code: > foreach ($this->data['Event'] as $event) { > $event['name'] = $this->data['Event'][0]['name']; > $event['description'] = $this->data['Event'][0]['description']; > $event['website_url'] = $this->data['Event'][0]['website_url']; > $event['flyer_url'] = $this->data['Event'][0]['flyer_url']; > $event['email'] = $this->data['Event'][0]['email']; > $event['tickets'] = $this->data['Event'][0]['tickets']; > > $this->Event->saveAll($event); > $this->Session->setFlash(__('The Event saved.', true)); > > } --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
