I want something to store an id list of another table in the database. But I do not know how to properly organize it. I understand that the type of the column should be Text, and when added, use a separator and somehow then divide this thing into these same id. Tell me who faced this.
Id
are stored, separated by a comma:"1,2,3,42"
. When adding a value,id
cast to a string, glued to a string with a separator,. And when pulling out, the reverse action is the separation of,
and coercion ofid
to number is gil9redString[] parts = string.split(", ");
go throughparts
after the cycle, converting to number - gil9red