| 
 1. magento问题提出: eav_entity_type,eav_entity_attribute,eav_attribute   mysql> select * from  eav_entity_type where entity_type_id=1;  +—————-+——————+——————-+—————–+—————–+  | entity_type_id | entity_type_code | entity_model      | attribute_model | entity_table    | +—————-+——————+——————-+—————–+—————–+  |              1 | customer         | customer/customer |                 | customer/entity |  +—————-+——————+——————-+—————–+—————–+    2). eav_entity_attribute表用来定义实体customer模型包含哪些属性   mysql> select * from eav_entity_attribute  where entity_type_id='1';  +———————+—————-+——————+——————–+————–+  | entity_attribute_id | entity_type_id | attribute_set_id | attribute_group_id | attribute_id |  +———————+—————-+——————+——————–+————–+  |                   1 |              1 |                1 |                  1 |            1 |  |                   2 |              1 |                1 |                  1 |            2 |  |                   3 |              1 |                1 |                  1 |            3 |  |                   4 |              1 |                1 |                  1 |            4 |  |                   5 |              1 |                1 |                  1 |            5 |  |                   6 |              1 |                1 |                  1 |            6 |  |                   7 |              1 |                1 |                  1 |            7 |  |                   8 |              1 |                1 |                  1 |            8 |  |                   9 |              1 |                1 |                  1 |            9 |  |                  10 |              1 |                1 |                  1 |           10 |  |                  11 |              1 |                1 |                  1 |           11 |  |                  12 |              1 |                1 |                  1 |           12 |  |                  13 |              1 |                1 |                  1 |           13 |  |                  14 |              1 |                1 |                  1 |           14 |  |                  15 |              1 |                1 |                  1 |           15 |  |                  16 |              1 |                1 |                  1 |           16 |  +———————+—————-+——————+——————–+————–+    3), 由上表推出customer实体包含16个属性,下面的语句查看每个属性的具体定义   mysql> select * from eav_attribute where attribute_id<=16 and attribute_id>=1 ;  +————–+—————-+——————+————–+  | attribute_id | entity_type_id | attribute_code   | backend_type |  +————–+—————-+——————+————–+  |            1 |              1 | website_id       | static       |  |            2 |              1 | store_id         | static       |  |            3 |              1 | created_in       | varchar      |  |            4 |              1 | prefix           | varchar      |  |            5 |              1 | firstname        | varchar      |  |            6 |              1 | middlename       | varchar      |  |            7 |              1 | lastname         | varchar      |  |            8 |              1 | suffix           | varchar      |  |            9 |              1 | email            | static       |  |           10 |              1 | group_id         | static       |  |           11 |              1 | dob              | datetime     |  |           12 |              1 | password_hash    | varchar      |  |           13 |              1 | default_billing  | int          |  |           14 |              1 | default_shipping | int          |  |           15 |              1 | taxvat           | varchar      |  |           16 |              1 | confirmation     | varchar      |  +————–+—————-+——————+————–+    所以,使用上述的模型,一旦有CUSTOMER属性定义的添加和删除,只需要增加或删除  eav_entity_attribute的记录即可   mysql> select * from customer_entity            ;  +———–+—————-+——————+————+——————–+  | entity_id | entity_type_id | attribute_set_id | website_id | email              |  +———–+—————-+——————+————+——————–+  |         1 |              1 |                0 |          1 | koda.guo@gmail.com |  +———–+—————-+——————+————+——————–+    mysql> select * from customer_entity_varchar    ;  +———-+—————-+————–+———–+————————————-+  | value_id | entity_type_id | attribute_id | entity_id | value                               |  +———-+—————-+————–+———–+————————————-+  |        1 |              1 |            5 |         1 | Koda                                |  |        2 |              1 |            7 |         1 | Guo                                 |  |        4 |              1 |            3 |         1 | Default Store View                  |  |        5 |              1 |           12 |         1 | 2256e441b74ab3454a41c821f5de1e9d:9s |  +———-+—————-+————–+———–+————————————- 从上表看到customer_entity  和customer_entity_varchar用来存放相应属性的实际输入值。如: 总结 | 



 tiff风格珠宝饰品外贸ecs
							人气:603
							tiff风格珠宝饰品外贸ecs
							人气:603
						 ecshop内衣服装综合模板
							人气:1237
							ecshop内衣服装综合模板
							人气:1237
						 ecshop 批量购买插件
							人气:1637
							ecshop 批量购买插件
							人气:1637
						 绿色保健品仿薄荷ecshop模
							人气:787
							绿色保健品仿薄荷ecshop模
							人气:787
						 ecshop仿emoi家居用品商城
							人气:979
							ecshop仿emoi家居用品商城
							人气:979
						 织梦dedecms绿色节能科技公
							人气:1349
							织梦dedecms绿色节能科技公
							人气:1349