In your practice_items_controller.php your pr should not have the lowercase
and underscored array element.
Check your form or wherever you're assigning this array and your pr should
look like
Array
(
[PracticeItem] => Array
(
[name] => Test
[description] => Test
)
)
PracticeItem is the Model Name
This is part of the whole convention over configuration.
Alan
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf
Of Johnny Ferguson
Sent: Wednesday, April 14, 2010 2:10 PM
To: CakePHP
Subject: Re: Cake won't save my data
I've checked with the folks in the IRC, and it looks like Cake
shouldn't care if I'm using InnoDB, but my data still won't show up in
the tables regardless of Cake giving me every indication that the save
was successful.
On 14 Apr, 16:43, Johnny Ferguson <[email protected]> wrote:
> I'm using InnoDB to allow data associations. Do I have to note this
> fact in my database.php?
>
> Other than that, I'm at a loss as to why this problem is occurring.
>
> My practice_items table:
> int - id
> varchar(255) - name
> text - description
>
>
/app/controllers/practice_items_controller.php:http://pastebin.com/K3uu38fw
>
> /app/views/practice_items/add.ctp:http://pastebin.com/dfxrnhhT
>
> the pr() statement successfully puts out the data I post through the
> form when using the add() method. I get this as a result of pr():
>
> Array
> (
> [practice_items] => Array
> (
> [name] => Test
> [description] => Test
> )
>
> )
>
> As I understand it, since id is auto-increment, I shouldn't need to
> explicitly pass that through the form. Cake gives me every indication
> that the save method worked, so I'm at a loss as to why the data isn't
> showing up in my practice_items table. I would think at the very least
> that cake would spit back a MySQL error if something were wrong.
>
> Here's my controller dump:http://pastebin.com/KHiZt8J8
Check out the new CakePHP Questions site http://cakeqs.org and help others
with their CakePHP related questions.
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
To unsubscribe, reply using "remove me" as the subject.
Check out the new CakePHP Questions site http://cakeqs.org and help others with
their CakePHP related questions.
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