2010-12-20 30 views

回答

1

您可以回聲出每個選擇的Magento確實有getSelect()方法。

一個客戶

echo Mage::getModel('customer/customer')->load('id')->getSelect();

或整個集合

echo Mage::getModel('customer/customer')->getCollection()->getSelect();

+0

與: Mage :: getModel('customer/customer') - > getCollection() - > addAttributeToSelect('postcode','70184');我有這個錯誤: 致命錯誤:調用成員函數isStatic()在C: .php on line 372 – Bizboss 2010-12-20 10:57:13

+0

我其實沒有測試過這個:)但是客戶有地址(發貨和計費),所以你需要查詢地址收集和加入用戶信息,反之亦然 – 2010-12-20 11:37:07

0

您必須搜索表customer_entitycustomer_address_entity

+0

是的,我知道,但是當我指定,以例如選擇具有郵政編碼客戶:70184 ?? 我該怎麼做? – Bizboss 2010-12-20 09:45:03

相關問題