将db的查询结果成功导入数组变量中的视图。但是无法读取视图上的单个字段值。为什么print_r($ sales-> creditofferamount)甚至没有显示任何数据。 我的控制器:
function edit($id = NULL)
{
$id = $this->input->get('id');
$sales = $this->Pricecomparison_model->getSalesByID($id);
$this->data['sales'] = $sales;
$this->data['id'] = $id;
$this->page_construct('pricecomparison/edit', $this->data);
}
查看:
<?
print_r($sales); //this shows all data values read from db
print_r($sales->creditofferamount); //although this feild contain data in it but still does not show it.
?>