在magento中获取customer_address_entity表中的max entity_id

时间:2014-08-08 12:36:18

标签: magento

我是magento的新手,如果有人知道如何在customer_address_entity表中获取max entity_id,请尽快回复

1 个答案:

答案 0 :(得分:0)

使用mysql

select entity_id from customer_address_entity order by entity_id desc

使用Magento Collection

echo "<pre>";
$collection = Mage::getModel('customer/customer')->getCollection()->getLastItem();
print_r($collection->getData());