I'm trying to create a system where I have two tables one call from acompanhamentos
and the other produtos
.
Within the accompanying table there is the sincroniza
column where I write several numbers separated by a comma, and these numbers are related to the column id in the products table.
I need to do a check that takes this value in the sincroniza
column and checks between the commas if there is an equal number in the produtos
table if it exists it pulls the name of the product and displays the name instead of displaying the number .
So far I have not been able to do anything about it, they told me about such a pivot table but I have no idea how to at least start this, since I do not know this pivot table and I am new to php and to mysql