Thanks. This will for admin panel only as only site owner will be able to add a property.
I tried to consolidate above 2 posts and this is what I came up with.
Code:
table_feature_types
id name
1 Kitchen
2 Bathroom
table_features
id id_feature_type(FK) name
1 1 marble sink
2 2 Shower
3 2 tiled flooring
table_property_types
id name
1 detached
2 semi-dearched
3 vacant (May need to hard code it in app so as not to show table for this property type)
table_property_for (NOT SURE about table name)
id name
1 Sale
2 Rental
table_properties
id address datelisted id_property_type(FK) id_property_for(FK)
1 address1 2007 1 1
2 address2 2008 2 2
table_property_features
id_property(pk,fk) id_feature(pk,fk)
1 1
2 1
2 2
Then, I can generate radio buttons OR multiple selection for EACH feature type and then DROP ALL entries for that property (if editing; 1 statement) and then copy the newly selected ones.
Is that the right way to go??
OFF TOPIC: Should I create separate table for things like "property status (Sold or available; just an example)", "property type" OR should I just give some numbers and hardcode them in my app??
Bookmarks