Hi,
if I want to change data in the second table, then it is stored in the table as a new Daternsatz in the database. Normally, the changed value will be saved.
What is the problem?
Thank you very much.
F.
HI Fredolino,
For a record to be updated there has to be a primary key value - id_auftrag in this case - which matches the existing record.
Bob
Hi Bob,
thanx for the tipp.
I must have a Costum Code in Setup bevor DB Save-Aktion (for 2n Table)?
F.
Hi Fredolino,
You have to include the record id in the data - you haven't said how this form works so hard to say more.
Bob
Hi Fredolino,
Both queries are updating the record with the ID 423. Is that what you intend?
Bob
Hi Bob,
you're right, the Statement for the 2nd table (Model Firma_1) is incorrect.
Now there are 2 updates. However, it is only correct if only the record is updated, which is to save on the form the modified value in the database.
F.
Hi Fredolino,
You have to make sure that the ID matches the record that you want to update.
Bob
Hi Fredolino,
Presumably the first one will be $form->data['Firma'][0]['id'] and the second one $form->data['Firma'][1]['id']
You could also use the Multi Save option in a single DB Save action.
Bob