Q: Mysql Many-Many Relationships How to insert, update, delete data with many to many relationed table of MYSQL?
E.g.: 
**Structure of my database**
table A -    ID, Field1, Field2, ...
table B-     ID, Field1, Field2...
table Refer- ID, AID,BID

Is there any automatic reflects system in refer table when insert data in tables A or B? 
For Example:
If I insert data in Table A with corresponding data in table B it will automatically reflects in Refer table based on Table A and B Relationships.
Please help me. Thanks in advance.

A: please have a look on below url for more detail and examples.
http://www.select-sql.com/mysql/how-to-merge-2-tables-into-one-result-in-mysql.html
http://www.mysqlperformanceblog.com/2008/09/11/auto_increment-and-merge-tables/
Thanks

A: You can use the following :


*

*delete part you can use ON DELETE CASCADE (example) but the ENGINE used should be InnoDB but then again you can use a trigger for delete also

*for inserts and updates you can use triggers (example,docs)

