E
E
Eldar Imamverdiyev2020-06-18 07:44:17
MySQL
Eldar Imamverdiyev, 2020-06-18 07:44:17

mysql trigger change all records to latest, how to fix this?

Created a trigger:

BEGIN
   INSERT INTO app_entity_141 Set field_1402 = new.field_1305, field_1397 = new.field_1304, field_1393 = new.field_1297, field_1394 = new.field_1330, field_1403 = new.field_1331, field_1395 = new.field_1333, field_1396 = new.field_1334;
END


When adding the first record, everything is fine. But as soon as I add another entry, all entries in the app_entity_141 table change to the value of the last added entry. There is no "attachment" to a line.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question