|
我的代码是这样的:
$this->db->select('name');
$this->db->from('table');
$this->db->where('id',1);
$query=$this->db->get();
echo $query;
为什么echo不出数据了??
而我这样写就可以出数据:
$this->db->select('name');
$this->db->from('table');
$this->db->where('id',1);
$query=$this->db->get();
foreach($query->result() as $row){
echo $row->name;
}
 |
|