php - Most efficient method to store MYSQL options and values in database -
i'm hitting dead best practice storing large amount of options , values in mysql database , assigning them properties. way (example real estate) create table called "pool" have auto increment value id , varchar store value, in case "above ground" , row "in-ground". in property table have column "has_pool" proper id value "pool" table assigned. problem hundreds of options (fireplace, water view, etc) each property, number of database tables large, fast , left joins become out of control on front side.
can point me in right direction on best practice populate new values property attributes , keep query count down minimum? feel there simple solution research far has not made apparent me. thank you!
one way create 'options' table 4 columns: id, menuid, value
create table called menus, 2 fields; id , name.
add menu names (pool, fireplace etc.) menus table, , add possible values options table, including id of menu related to.
Comments
Post a Comment