Welcome Guest, Not a member yet? Register   Sign In
Fatal error: Call to a member function result() on a non-object in D:\CooTel\wamp\www\Codeigniter2.1.4\application\core\
#1

[eluser]hengsopheak[/eluser]
Dear Team Please help me!!!
I have many errors on this below code Call to a member function result() on a non-object in Codeigniter
Please help me

public function get($id = NULL, $single = FALSE) {
if ($id != NULL) {
$filter = $this->_primary_filter;
$id = $filter($id);
$this->db->where($this->_primary_key, $id);
$method = 'row';
} elseif ($single == TRUE) {
$method = 'row';
}
else{
$method='result';
}
if(!count($this->db->ar_orderby)){
$this->db->order_by($this->_order_by);
}
return $this->db->get($this->_table_name)->$method();
//return ($result instanceof CI_DB_mysql_result) ? $result->result() : false;
}
#2

[eluser]hengsopheak[/eluser]
[quote author="hengsopheak" date="1400652992"]Dear Team Please help me!!!
I have many errors on this below code Call to a member function result() on a non-object in Codeigniter
Please help me

public function get($id = NULL, $single = FALSE) {
if ($id != NULL) {
$filter = $this->_primary_filter;
$id = $filter($id);
$this->db->where($this->_primary_key, $id);
$method = 'row';
} elseif ($single == TRUE) {
$method = 'row';
}
else{
$method='result';
}
if(!count($this->db->ar_orderby)){
$this->db->order_by($this->_order_by);
}
return $this->db->get($this->_table_name)->$method();
//return ($result instanceof CI_DB_mysql_result) ? $result->result() : false;
}[/quote]




Theme © iAndrew 2016 - Forum software by © MyBB