There are two tables,Table 1 and Table 2,Table 1 have column ID_A and ID_B. Table 2 have column ID.now user can make both ID_A and ID_B join with the ID.so when user clicking one row of the Table 1.ID_A or ID_B match the ID value will mark on the Table 2.and if user clicking one row of Table 2,Table 1 will marking the row which ID_A or ID_B match the ID value.