magento getviewurl()的工作功能如何? 以及如何获取$ order-> getId()?

how work function of magento getviewurl()? and how it fetch $order->getId()?

public function getViewUrl($order)
{

    return $this->getUrl('*/*/view', array('order_id' => $order->getId()));
}

i just want to know how it fecth getId() from which table?

If table is all that you want its getting from id from sales_flat_order

But magento follows an eav system and I think you are confused how the order is getting data

If this is the case then you have to get some idea about Magento model, resource model, collection

Orders data are saved in database tables sales_flat_order and sales_flat_order_item