Is there any provision for creating arrays (variable length would be preferable) in MySQL . I need to create 2-3 lists for each user and update/append/delete items from the lists . How do I implement them? . Creating tables for each user will lead to a total mess in my opinion, but anyway I’m new to MySQL so please help me out . Thanks
EDIT:The lists will be one dimensional and contain the ids of other users.
It would be better if you told us what you are trying to do, not how you are trying to achieve it. Anyway, you can solve it using three tables
List1,List2andList3with columnsUSER_ID,YOUR_VALUE.You query the list for the specified user using this query:
Updating values:
Deleting all values for a specified user:
Delete some values (depending on a condition) for a given user: