Reputation: 8239
Below is my current structure for MySQL database
id | item_name | item_files
------------------------------------------
1 | Item A | file1.zip,file2.zip,file3.zip
2 | Item B | file3.zip
Example I create simple form to fill up Item Name
and Multiple upload files
then store it to db.
Question :-
explode
, implode
to get the file1.zip file2.zip file3.zip
Upvotes: 0
Views: 130
Reputation: 212412
Normalize your data tables
items table
id | item_name
--------------
1 | Item A
2 | Item B
item_files table
id | item_id | item_files
-----------------------------------
1 | 1 | file1.zip
2 | 1 | file2.zip
3 | 1 | file3.zip
4 | 2 | file3.zip
Upvotes: 3