[eluser]teddy[/eluser]
I waste a lot of time because I can't select some values from table, I can insert to database table on host but can't get it with select query, at local everything is ok I can select, insert.
And below is my code, if I remove two lines mark [x] I can load view template success, If not the browse firefox, chrome is not show anything I just get a white page, I don't know where is my wrong, thank you for reading my topic
My autoload.php
Code:
$autoload['libraries'] = array('database','session');
My common model
Quote:function getTinhThanhPho()
{
$sql="select id,ten_tinh from tbl_tinhthanhpho";
$rs=$this->db->query($sql)->result_array();
return $rs;
}
and in my controller function I get values return from common model
Quote:function show()
{
[x] $tinhthanhpho=$this->common_model->getTinhThanhPho();
[x] $data['tinhthanhpho']=$tinhthanhpho;
$this->load->view('index',$data);
}