How to store multiple record in Mysql variable?

How can I store a list of primary keys in a MySQL record?

  • I have a list of IP in a table that I link with a user in another table. For one IP it works well, but for multiple IP to one user it become harder. I want to avoid duplicates so I think that I need an ENUM type column in my user table .... However ENUM is static sized and I need dynamic size. Is there any trick that avoids me to use serialization technique in a text or blob type ?

  • Answer:

    Why not have a separate table to contain the links?  (e.g. a table that has a user_id and ip_id)

Joe Emison at Quora Visit the source

Was this solution helpful to you?

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.