Forum Moderators: coopster
i have a field "property_type" i want it to have 3 default values which are "building, villa, warehouse" and when a user (the admin) want to add property he will have a drop down list with the 3 values i said before
Thank you :)
property_type enum('building', 'villa', 'warehouse') not null default 1
But I think this is not the optimized solution. A better one is to have a separate table "property_types" with two columns - property_type_id and property_type_name. Than, in the properties table, you will store just the property_type_id number. This will be foreign key to the "property_types" database table.