Copy link to clipboard
Copied
Hello.
I am a bit of a php/mysql newbie. I'm trying to figure out how to select multiple data entries from one database column.
For example, I have a column in one table called name_id. I want to assign multiple names to a specific entry in this table. Like, "1,4,12,18", for example. Each of these numbers are the primary keys for my name table. So, I'm trying to assign 4 people to one set of data in this example.
I have seen this done before, I just don't know how to select this data once it is in there. I think it may have something to do with arrays, but I'm not sure.
I hope this makes sense, any help would be much appreciated.
Copy link to clipboard
Copied
That's a poor design plan as it violates the basic rules of normalization and will cause problems in the end. Just create another table to link to and store the one value in each row. If you need more details, then tell us exactly what you are trying to do.
Copy link to clipboard
Copied
Okay, I will do it this way. Thanks.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now