I have a 3 tables.
First one is the cars table.
Second one is the categories table.
Third one is the relation table between them.
cars table:
record_id, category_id, car_name
1, 1, CR-V
categories table:
record_id, category_name, parent_id, group_id
1, Automotive, 0, 1
2, Motocycles, 0, 2
3, Car Maker, 1, 1
4, Fuel Types, 1, 1
5, Honda, 3, 1
6, Subaru, 3, 1
7, Gasoline, 4, 1
8, Diesel, 4, 1
car_sub_categories:
record_id, car_id, sub_category_id
1, 1, 5
1, 1, 7
I need a form which store a car and also subcategories in relational table.
Car - classic form type from entity cars.
Sub categories like multiple combo boxes (based on sql query where conditions).
Car part of form will be saved to the car table.
Combo boxes part of form will be saved to the relational table.
Every combo box option is as the one row in standalone table.
thank you very much
hope it is more clear now
Aucun commentaire:
Enregistrer un commentaire