Magento中的自定义查询

时间:2012-05-24 05:50:08

标签: magento

我正在magento中为catalog_product_entity_text表中的产品属性编写自定义查询,

    $write->query("INSERT INTO catalog_product_entity_text SET entity_type_id = 4, attribute_id = ".$attributeID.", store_id = 0, entity_id  = '".$productID."', value = '".addslashes($value)."'");

当我在值中使用少量字符时,它可以正常工作,例如

    $value = 'abcd'; //less than 200 characters

但是当我在像

这样的值中使用更多字符时
    $value = 'abcd . . . . '; //more than 200 characters

它不起作用并返回页面加载错误

任何想法?

0 个答案:

没有答案