2014-07-02 46 views

回答

1

表格格式嘗試

$collection = Mage::getResourceModel('customer/customer_collection'); 
$collection 
    ->addAttributeToSelect(*) 
    ->addAttributeToSort('updated_at', 'DESC') 
    ->getSelect()->limit(1); 

$customer = $collection->load(); 
+0

您好感謝對於你的重播 – user127025

+0

我已經嘗試過,但錯誤下面我用你的代碼<?php $ client = new SoapClient('http:// localhost:8888/e-commerce/api/soap /?wsdl',array('trace'=> TRUE)); $ session = $ client-> login('admin','admin12345'); $ collection = Mage :: getResourceModel('customer/customer_collection'); (*) $ collection-> - > addAttributeToSelect(*) - > addAttributeToSort('updated_at','DESC') - > getSelect() - > limit(1); $ customer = $ collection-> load(); echo'$ customer'; ?> – user127025

+0

錯誤消息:解析錯誤:語法錯誤,意外的' - >'(T_OBJECT_OPERATOR),預計標識符(T_STRING)或變量(T_VARIABLE)或'{'或'$'在C:\ e-comm \ xampp \ htdocs \ e-commerce \ lastUD.php在線9 – user127025

0

只是箱子像下面

------------------------------------------ 
id (auto increment) | name | PW 
------------------------------------------ 

,並使用此下面的代碼

SELECT * FROM table ORDER BY id DESC