magento case when then

piaoling  2011-08-10 14:17:09

$lastFixed='zzzzzzzzzzzzzzzzzzzz';
            $conditionSelect->joinLeft(array('_table_score_cus'=>'catalog_product_entity_varchar'),"_table_score_cus.entity_id=e.entity_id and _table_score_cus.store_id='0' and _table_score_cus.attribute_id = '$productScoreId'",array('score'=>new Zend_Db_Expr("CASE WHEN _table_score_cus.value IS NULL
THEN '$lastFixed'
ELSE _table_score_cus.value
END")));

类别 :  magento(258)  |  浏览(3933)  |  评论(0)
发表评论(评论将通过邮件发给作者):

Email: