Bear with me, im really bad at explaining thing and i dont even know an appropriate title for this problem
Ok guys i have this problem
I already have one table name meal
+------+--------+-----------+---------+
| id | name | serving | price |
+------+--------+-----------+---------+
| 1 | soup1 | 2 person | 12.50 |
+------+--------+-----------+---------+
| 2 | soup2 | 2 person | 15.50 |
+------+--------+-----------+---------+
| 3 | soup3 | 2 person | 23.00 |
+------+--------+-----------+---------+
| 4 | drink1 | 2 person | 4.50 |
+------+--------+-----------+---------+
| 5 | drink2 | 2 person | 3.50 |
+------+--------+-----------+---------+
| 6 | drink3 | 2 person | 5.50 |
+------+--------+-----------+---------+
| 7 | frui1 | 2 person | 3.00 |
+------+--------+-----------+---------+
| 8 | fruit2 | 2 person | 3.50 |
+------+--------+-----------+---------+
| 9 | fruit3 | 2 person | 4.50 |
+------+--------+-----------+---------+
Ok now i want to allow admin to create a combo meal from this meal
table
So that mean, a combo meal can have unlimited number amout of meal
Currently im puzzle how to store/link combo meal to the meal
I donw want to store something lke below
+------+--------------+-----------+-----------+
| id | combo_name | serving | meal_id |
+------+--------------+-----------+-----------+
| 1 | combo1 | 2 person | 1,4,7,9 |
+------+--------------+-----------+-----------+
| 2 | combo2 | 2 person | 2,5,8 |
+------+--------------+-----------+-----------+
| 4 | combo3 | 2 person | 3,5,6,9 |
+------+--------------+-----------+-----------+
Look at the meal_id
column, i dont think that is a good way to store a data
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…