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

[eluser]Unknown[/eluser]
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 problem...it shows Fatal error: Call to a member function result_array() on a non-object ...

El Forum

[eluser]aquary[/eluser]
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

[eluser]Kamarg[/eluser]
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

[eluser]aquary[/eluser]
In that case, result_array() should already return empty array.

From the userguide
result_array()
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.