Welcome Guest, Not a member yet? Register   Sign In
error in pagination
#1

[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 ...
#2

[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
#3

[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.
#4

[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.




Theme © iAndrew 2016 - Forum software by © MyBB