[eluser]Lazos[/eluser]
I have this query in my model. I want to extract the last row but I am getting this error:
Fatal error: Call to a member function last_row() on a non-object in D:\websites\dissertation\application\models\admin\content_model.php on line 54
Why this error is occurred? How can I solve it to get the last row?
Code:
function dbContentOrderMany ($parentid, $orderid) {
$this->db->select('content_id');
$this->db->from('my_content');
$this->db->where("parent_id", $parentid);
$this->db->order_by('item_order', 'ASC');
$result = $query->last_row('array');
if ($result == $orderid) {
return true;
}
}