Try this:
if (!empty($this->data)) {
$this->Modalidad->create();
if ($this->Modalidad->save($this->data)) {
die("Entro");
} else {
$this->Session->setFlash('Ocurrieron errores salvando los
datos', 'default', array('class' => 'example_class'));
die(debug($this->Modalidad->validationErrors));
}
/* you don't need to use $this->render(), so get rid of it
} else {
$this->render();
*/
}
Jeremy Burns
Class Outfit
Tel: +44 (0) 208 123 3822
Mob: +44 (0) 7973 481949
Skype: jeremy_burns
http://www.classoutfit.com
On 30 Sep 2011, at 09:32, [email protected] wrote:
> Well the DB isn't MySQL it's SQLite3 ;) I debug $this->data and have values
> and where I need to write debug($this->Modalidad->validationErrors); after
> create() or after save()? I'm newbie with Cake and I'm trying to learning and
> thanks all of yours for the help you bring to me
>
> Ing. Reynier Pérez Mira
> Cel: +58 416.921.7406
> Correo: [email protected] / [email protected]
>
>
>
> On Thu, Sep 29, 2011 at 12:33 PM, Toby G <[email protected]> wrote:
> I think we'll need some more info...
>
> I woud suggest inspecting your validation erros to see if that's
> preventing the records from being saved.
>
> debug( $this->Modalidad->validationErrors );
>
> If you enable debugging, can you see any insert comments in the MySQL
> debugging info?
>
>
>
> On Sep 29, 3:53 pm, "[email protected]" <[email protected]> wrote:
> > Hi,
> > I have a BIG problem because as the title says I can find() but can't save()
> > and not understand where the problem is. This the
> > code:http://pastebin.com/VNYSh5j3, can any help me to find where the
> > problem is?
> >
> > Cheers and thanks in advance
> > Ing. Reynier Pérez Mira
> > Cel: +58 416.921.7406
> > Correo: [email protected] / [email protected]
>
> --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
>
>
> To unsubscribe from this group, send email to
> [email protected] For more options, visit this group at
> http://groups.google.com/group/cake-php
>
>
> --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
>
>
> To unsubscribe from this group, send email to
> [email protected] For more options, visit this group at
> http://groups.google.com/group/cake-php
--
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others
with their CakePHP related questions.
To unsubscribe from this group, send email to
[email protected] For more options, visit this group at
http://groups.google.com/group/cake-php