Updating database existing record

aamir2013

New Member
Hi, I am trying to update the existing database record with different value using fabrik form... i have "calander table'' in which "PAYPERIOD" is Primary key and it lists the months (JAN, FEB, MARCH...) and another field "STATUS" which is either 'Active' or 'In-Active' along with default id and date.. At front end on the form I am choosing pay-period through fabrik dropdown and so is status.

Suppose if in the table "PAYPERIOD" is "August 2013" and 'Status' is "In-Active" and i want to update it with status "Acitve" and save it then i get the error message (see attached photo).

But if i change the Primary key to 'ID' (Auto-Increment) then it adds another row in the table.

Could someone please help me on this? It would be much appreciated.
 

Attachments

  • fab.JPG
    fab.JPG
    53.2 KB · Views: 233
yes ID is enabled but i have changed it from auto_increment because i used payperiod as primary key to update its status...

What i understand is that "Submit" button sends an INSERT query but the record already exists. it should be an UPDATE query
 
Set ID as primary key and autoincrement.
Make sure this is the PK in Fabrik (list settings) and in your database
It seems the settings are mixed up.
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top