Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/275.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/mysql/56.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 如何使用MySQL查询更新产品重量和生产国?_Php_Mysql_Magento_Magento 1.7 - Fatal编程技术网

Php 如何使用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

如何使用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 
    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。谢谢,谁看了这个问题。如果你有答案,请写在这里作为答案。或者删除你的问题,我有疑问。谢谢,谁看了这个问题。如果你有答案,请写在这里作为答案。或者删除你的问题。