Calling data from pagination result |
[eluser]mflammia[/eluser]
Hi All, Just wondering what I am doing wrong here. I have the following function in my controller: Code: function databaselist() The output of which is: Code: CI_DB_mysql_result Object Now this is where I am going wrong but from the few places I have read how to configure I should be able to call the data with something like the following: Code: <?PHP foreach($records as $data){ But this is producing a Quote:Message: Trying to get property of non-objecterror. I see its because of the way $result is constructed but I don't know how to call / code getting the right data? Thanks in advance.
[eluser]Aken[/eluser]
You need to use a result method after using get() or similar. See the get() method example here.
[eluser]mflammia[/eluser]
Great! Thanks for the reply, that sorted it. Code: <?PHP foreach($records->result() as $data){ |
Welcome Guest, Not a member yet? Register Sign In |