Wednesday, May 20, 2015

Re: All form fields are not saving in my cakephp database

it looks like your primary key isn't defined correctly.

cakephp will expect a primary key of 'id'. if yours is called something different you'll need to declare it in the model.


regards
Mike


On 19 May 2015, at 14:00, Clement Crownrise <clementcrownrise@gmail.com> wrote:

Below is the array of what is being filled in the form, this is what is supposed to be saved in the database

Array ( [Appliedjob] => Array ( [jobid] => 2 [jobtitle] => Chashier [companname ] => GTBank [firstname] => Clement [lastname] => Adetunji [Email] => clementcrownrise@gmail.com [upload] => samlogs_r2_c3.jpg ) )

But looking at the query table below the page, the sql insert statement is not complete, it doesnt include other form fields

INSERT INTO `cakephp`.`appliedjobs` (`firstname`, `lastname`, `modified`, `created`) VALUES ('Clement', 'Adetunji', 1432040170, 1432040170)

What could be the cause of this please ?

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.

....................................
Mike Karthäuser
Director, Brightstorm Ltd.

1, Brewery Court
North Street
Bristol
BS3 1JS

mikek@brightstorm.co.uk
www.brightstorm.co.uk
+44(0) 7939252144
....................................

No comments: