在magento中订购的客户的性别
答
在我的数据库,它是:
SELECT t0.entity_id, t1.value
FROM customer_entity AS t0
INNER JOIN (
SELECT t2.entity_id, t2.value
FROM customer_entity_int AS t2
WHERE (t2.attribute_id = 18)
) AS t1
ON (t0.entity_id = t1.entity_id)
你attribute_id = 18
可能会有所不同。
你需要找到它:
SELECT t1.attribute_id, t1.attribute_code, t1.backend_type
FROM eav_entity_type AS t0
INNER JOIN eav_attribute AS t1
ON (t0.entity_type_id = t1.entity_type_id)
WHERE (t0.entity_model = @p0)
-- p0 = [customer/customer]
怎么样 '选择customer_prefix FROM sales_flat_order WHERE increment_id = “100000XXXX”;'' –
列customer_prefix'为空。有没有其他方法可以从客户性别中获取? – Dilani