CodeIgniter Forums

Full Version: error in pagination
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

Some body please help me...

I was doing adding,deleting and editing for a page content in codeigniter..The problem arises when i add pagination to the page..there is no problem for add or edit. But for delete, there is some shows Fatal error: Call to a member function result_array() on a non-object ...

El Forum

Please post the code of your data selection, especially those around the line number included with the error.

Actually... this should be in the Coding forums >:3

El Forum

Check that your query is succeeding. It appears that it is failing and returning boolean FALSE which obviously doesn't have a result_array function.

El Forum

In that case, result_array() should already return empty array.

From the userguide
This function returns the query result as a pure array, or an empty array when no result is produced.

PS. Somehow, I remembered seeing the $this->db->result(); returned FALSE when it's empty... have to check about this.