Welcome Guest, Not a member yet? Register   Sign In
can't pull values from table but insert is ok
#1

[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);
}


Messages In This Thread
can't pull values from table but insert is ok - by El Forum - 11-01-2012, 10:15 AM
can't pull values from table but insert is ok - by El Forum - 11-01-2012, 10:54 AM
can't pull values from table but insert is ok - by El Forum - 11-01-2012, 11:00 AM
can't pull values from table but insert is ok - by El Forum - 11-01-2012, 09:08 PM
can't pull values from table but insert is ok - by El Forum - 11-01-2012, 11:27 PM



Theme © iAndrew 2016 - Forum software by © MyBB