Php 如何使用MySQL查询更新产品重量和生产国?
如何使用Magento 1.7.0.2中的MySQL查询更新产品的重量和生产国?有关重量,您可以使用以下查询:Php 如何使用MySQL查询更新产品重量和生产国?,php,mysql,magento,magento-1.7,Php,Mysql,Magento,Magento 1.7,如何使用Magento 1.7.0.2中的MySQL查询更新产品的重量和生产国?有关重量,您可以使用以下查询: UPDATE catalog_product_entity_decimal AS ped JOIN eav_attribute AS ea ON ea.entity_type_id = 10 AND ea.attribute_code = 'weight' AND ped.attribute_id = ea.attribute_id SET
UPDATE
catalog_product_entity_decimal AS ped
JOIN
eav_attribute AS ea
ON
ea.entity_type_id = 10
AND ea.attribute_code = 'weight'
AND ped.attribute_id = ea.attribute_id
SET
ped.value = {your new value}
WHERE
ped.entity_id = {the product id to update}
如果要更新制造商所在国家/地区
UPDATE
catalog_product_entity_varchar AS pev
JOIN
eav_attribute AS ea ON ea.entity_type_id = 10
AND ea.attribute_code = 'country_of_manufacture'
AND pev.attribute_id = ea.attribute_id
SET
pev.value = '{new country_id}'
WHERE
pev.entity_id = {the product id to update}
可使用的国家列表可在此表“目录\国家”中找到,请使用国家id进行更新
如果启用了目录产品平面索引,请不要忘记在更新权重值后重新编制索引。您可以使用以下查询:
UPDATE
catalog_product_entity_decimal AS ped
JOIN
eav_attribute AS ea
ON
ea.entity_type_id = 10
AND ea.attribute_code = 'weight'
AND ped.attribute_id = ea.attribute_id
SET
ped.value = {your new value}
WHERE
ped.entity_id = {the product id to update}
如果要更新制造商所在国家/地区
UPDATE
catalog_product_entity_varchar AS pev
JOIN
eav_attribute AS ea ON ea.entity_type_id = 10
AND ea.attribute_code = 'country_of_manufacture'
AND pev.attribute_id = ea.attribute_id
SET
pev.value = '{new country_id}'
WHERE
pev.entity_id = {the product id to update}
可使用的国家列表可在此表“目录\国家”中找到,请使用国家id进行更新
如果启用了目录产品平面索引,请不要忘记在更新值后重新编制索引I got query for this。谢谢,谁看了这个问题。如果你有答案,请写在这里作为答案。或者删除你的问题,我有疑问。谢谢,谁看了这个问题。如果你有答案,请写在这里作为答案。或者删除你的问题。