About Mysql triggers !! When I create A trigger in the insertA table, I also add some values of related fields in table A to Table B. The IDs in Table A are automatically increased and primary keys, this id value should be placed in the int field lid of Table B, but why can other fields have a value, but this field is 0 at a time? ------ Solution -------------- about Mysql triggers !!
Trigger created by me
When inserting Table A, add the values of related fields of Table A to Table B,
The IDs in Table A automatically increase and are also primary keys,
This id value should be placed in the int field lid of Table B, but why can other fields have a value, but this field is 0 at a time?
------ Solution --------------------
MYSQL is only responsible for its own affairs, but it cannot be managed by others.
It's like a monk cannot manage nangu.
------ Solution --------------------
In any case, your mysql should be called by php.
Just assemble the query string during the call.
You can filter out unsafe factors.